Skip to main content
Solved

measure extraction and measure calibration

  • October 16, 2018
  • 2 replies
  • 105 views

Forum|alt.badge.img

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

Best answer by takashi

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • October 16, 2018

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.


Forum|alt.badge.img
  • Author
  • 97 replies
  • October 17, 2018

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