Skip to main content

Hi,


I have roads with start and end measures. I use measure setter and
then measure extraction of whole line. I got measures on vertex like 179.789 and I’d like to have it like 180 (rounded numbers)

Is-it
possible to get measures as integer number?

And
another problem that I have points with measures and I’d like to
calibrate my roads but calibration transformer give an error (python
error – index is out of range).

Any
idea how can solve those problems (I’m using fme 2018)

Thanks

Hi @miladahmad, a possible way is: after extracting the measure values as a list attribute, explode the list with the ListExploder, round each measure value with the AttributeRounder, re-create a list from the rounded measure values with the ListBuilder, merge the list to the original line, and finally re-set measure from the list with the MeasureSetter. The workflow looks like this, assuming that the line features have unique ID attribute called "_line_id".

I have no idea on the second question, since I'm unclear what you did with what transformer. If you encountered the Python error while using the MeasureCaliblator from FME Hub, contact the author of the custom transformer.


thanks @takashi,

I tried it today but I got (AttributeRounder: High-precision rounding procedure resulted in overflow; original value kept for attribute '_measures'.). then there is no change.

For the second question: I have points with measure and I like to calibrate my roads-vertex measure) with those points-measures.

Anyway thanks for your help


Reply