Question

a lines intersecting operation


Badge

Hello,

I have a network of (+) intersecting lines (There is no (T) intersections). I have also nodes of these + intersections also extracted.

I want that whenever there is an intersection, the shortest line to be splitted to 2 lines but the long ones remains as it is

Can anyone help me with this ?

Thank you very much


6 replies

Userlevel 4
Badge +30

Hi @lianaolianov

Could you share us your workspace template?

Thanks,

Danilo

Badge

Hi @lianaolianov

Could you share us your workspace template?

Thanks,

Danilo

Hello,

 

Here is my worksapce hydrographic-4quadrant-splitter.fmw

 

Sorry for late reply and thank you :)

 

Badge

1) get the length of your lines by using a LengthCalculator.

 

2) Use a SpatialRelator and set 'Accumulation mode' to 'Merge Attributes'. Use the nodes as requestor (and make sure they have a unique id) and the lines as supllier.

3) Then use a TestFilter to compare the 2 length attributes (which should be added to the node they intersect) to see which line is the longest for each node.

4) For the shortest lines: use a PointOnLine overlayer or Intersector to split them into two segments.

5) Use a FeatureMerger to recover the longest lines from the original dataset based on their ID.

 

 

Without seeing the data I am not sure if this would cover your question completely, but it can give you a direction on how to start.
Badge

1) get the length of your lines by using a LengthCalculator.

 

2) Use a SpatialRelator and set 'Accumulation mode' to 'Merge Attributes'. Use the nodes as requestor (and make sure they have a unique id) and the lines as supllier.

3) Then use a TestFilter to compare the 2 length attributes (which should be added to the node they intersect) to see which line is the longest for each node.

4) For the shortest lines: use a PointOnLine overlayer or Intersector to split them into two segments.

5) Use a FeatureMerger to recover the longest lines from the original dataset based on their ID.

 

 

Without seeing the data I am not sure if this would cover your question completely, but it can give you a direction on how to start.
Hello

 

Thank you for the reply

 

I am following the steps, but actually I get just One length attribute per node, how do I get the two separately ?

 

 

Badge

1) get the length of your lines by using a LengthCalculator.

 

2) Use a SpatialRelator and set 'Accumulation mode' to 'Merge Attributes'. Use the nodes as requestor (and make sure they have a unique id) and the lines as supllier.

3) Then use a TestFilter to compare the 2 length attributes (which should be added to the node they intersect) to see which line is the longest for each node.

4) For the shortest lines: use a PointOnLine overlayer or Intersector to split them into two segments.

5) Use a FeatureMerger to recover the longest lines from the original dataset based on their ID.

 

 

Without seeing the data I am not sure if this would cover your question completely, but it can give you a direction on how to start.
Hello,

 

I solved the problem by creating a list and exposing the two lengths as attributes

 

 

Badge
Hello,

 

I solved the problem by creating a list and exposing the two lengths as attributes

 

 

Great to hear!

 

 

Reply