Skip to main content

Hi,

I want to split lines under certain conditions.

I have a given line C and two new lines A and B. Line A touches line C at an end. Line B touches line C in between.

The aim is to create two new lines C1 and C2 with a attribute called "Parent-ID" with value C. Furthermore I want to know which line splits C and which line only touches C at an endpoint.

Can someone help me to do this?

Thanks

Hi

The Intersector or the TopologyBuilder might be a good starting point.

David


The TopologyBuilder is the way to go. You can test the Node port to find those with _node_angle{} element count > 2 and FeatureMerger those that pass back on to the Edge features via the _node_number from the Node features and the _from_node | _to_node on the Edge features.

 

 

You'll probably want an attribute to differentiate the new lines (A,B) from the original line (C) so you can test and split the stream after.

 

 

The TopologyBuilder will split all intersecting lines and preserver the original attributes, which you can then rename as necessary

You can also use intersector (or Topologybuilder) and extract the start- and endcoördinates and then use a listbuilder grouped by the x and y coordinates..


Reply