Skip to main content
Solved

Numbering segments of line

  • October 27, 2020
  • 2 replies
  • 139 views

torbjornd
Contributor
Forum|alt.badge.img+5

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?

Best answer by david_r

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.

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

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • October 27, 2020

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


david_r
Celebrity
  • Best Answer
  • October 27, 2020

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.