Tuesday, 10 December 2019

fme - Find dangling lines


If I have a network of roads. Each road consist of segments. I need to delete all segments that are starting segments of each road and also delete all side roads (dangling) which are represented with only one segment. I do not have idea how to realize this. Any tips? To delete such lines actually means not to proceed them further.



Answer



You can find lines that are only a single segment by using the CoordinateCounter. Throw away anything that has a count of 2. Doesn't always mean they are a dangle though.


The surer - but longer - method would be to use the TopologyBuilder and check to see where a segment has a node ID that is not referenced by any other segment. Then it must be a dangle.



No comments:

Post a Comment