Skip to main content
Question

Find Line Order within a line dataset

  • November 25, 2015
  • 6 replies
  • 101 views

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!

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+49
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
Influencer
  • 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
Influencer
  • November 25, 2015
takashi wrote:
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...

  • Author
  • November 26, 2015
takashi wrote:
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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings