Skip to main content

Hi.

In one of my FME-workbenches I'm splitting lines at several points (water lines and devices) by using a PointOnLineOverlayer. After the splitting, I want to create a numbering of the new line segments according to the direction the line has been digitalized. I've tried using a counter with the ID of the lines as the countername, so I get a count based on the ID. But the result is not what I want. The numbering seems random.

 

As you can see from the first example (just a mockup), each line has an ID and you can see where the points are.Fme_nummerering1After I split my lines and calculate a new ID, I get this:

Fme_nummerering_wrongThe segment IDs are not numbered in the direction of the lines. What I want to achieve is this:

Fme_nummerering_correct 

Do you have any suggetions?

Add a measure to your lines before splitting, you can then extract the measure at the start point of each line segment, and sort by this value before numbering with the counter


Just a thought, how about first setting M values on the entire polyline (MeasureGenerator), then sorting the clipped lines by the starting M value (MeasureExtractor + Sorter) to get them in the right order before the Counter.


Reply