Skip to main content
Question

Find Line Order within a line dataset

  • November 25, 2015
  • 6 replies
  • 124 views

Forum|alt.badge.img
hi, I'm trying to establish the order of line features within a line dataset so i can apply an sequential ID in the direction of travel. All line are snapped together with the exception of the start of the first line and end of the last line. I have attempted to use CoordinateExtractor and NeighbourFinder but as the line doubles back on itself (but doesn't self intersect) the numbering is sometimes out of sequence along the line itself. I feel like this should be a fairly struighforward task but i am currently flummoxed! Many thanks!
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.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+62
I'm not sure whether I completely understand the problem, but here goes: FME reads the features in the order in which they're in the original dataset. So if they are in the correct order there FME will read them in the correct order. Then to assign a sequential ID you can use the Counter. Hope this helps.

takashi
Celebrity
  • November 25, 2015
Hi, the LineJoiner and PathSplitter might help you.
  1. LineJoiner - List Name: _list, Preserve lines as Path Segments: Yes
  2. PathSplitter - Segment Number Attribute: _segment_number, List Attribute: _list{}
You can use the Segment Number Attribute (or +1) as required sequential ID. Takashi

takashi
Celebrity
  • November 25, 2015
Hi, the LineJoiner and PathSplitter might help you.
  1. LineJoiner - List Name: _list, Preserve lines as Path Segments: Yes
  2. PathSplitter - Segment Number Attribute: _segment_number, List Attribute: _list{}
You can use the Segment Number Attribute (or +1) as required sequential ID. Takashi

It may also be necessary to set "yes" to the Preserve Original Orientation of the LineJoiner.


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • November 25, 2015
Or just a topology builder and use the node number attribute it creates? ..For a single set of lines. (some relation) For multiple sets you need to relate the touching ones and set an id per set. Then you can use topologybuilder with group by id and use nodenumber.

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • November 25, 2015
..wich latter requires more tranformers than joining, preserve path and splitting...

Forum|alt.badge.img
  • Author
  • November 26, 2015
Hi, the LineJoiner and PathSplitter might help you.
  1. LineJoiner - List Name: _list, Preserve lines as Path Segments: Yes
  2. PathSplitter - Segment Number Attribute: _segment_number, List Attribute: _list{}
You can use the Segment Number Attribute (or +1) as required sequential ID. Takashi

Thanks! Worked a treat, just what i was looking for.