Skip to main content
Question

Detection the gap between two lines

  • May 29, 2018
  • 10 replies
  • 217 views

lazarlubomir
Contributor
Forum|alt.badge.img+10

Hello,

please, Im trying to solve interesting issue in gasoline industry. I have the source file, contains lines features, and I need to compare lines to each other. Issue is following:

- none of line end-points cannot be in distance 5-30 centimeters to end-points, vertices or line segment of another lines

Is there any possibility to detect this gap between lines please?

Thank You so much!

Lubo

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.

10 replies

david_r
Celebrity
  • 8394 replies
  • May 29, 2018

My first try would be to convert the line endpoints to point geometries and use the NeighborFinder.


lazarlubomir
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 165 replies
  • May 29, 2018

My first try would be to convert the line endpoints to point geometries and use the NeighborFinder.

@david_r,

 

 

thank You for tip! Unfortunately, NeighborFinder doesn´t support interval value for maximum distance paramater - I need to find all point in distance 5-30 centimeters...

 


david_r
Celebrity
  • 8394 replies
  • May 29, 2018
@david_r,

 

 

thank You for tip! Unfortunately, NeighborFinder doesn´t support interval value for maximum distance paramater - I need to find all point in distance 5-30 centimeters...

 

I would set the NeighborFinder to 30 centimeters, then use e.g. a Tester on "_distance" to exclude those <5 centimeters.

lazarlubomir
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 165 replies
  • June 1, 2018
I would set the NeighborFinder to 30 centimeters, then use e.g. a Tester on "_distance" to exclude those <5 centimeters.
@david_r,

 

 

thank You so much, I forgot that NeighbourFinder can calculate distance between points... And what if I want to check, if lines connected to each other are connected only through end-points or vertex points? I need to detect lines, which are spatially connected, but not through end-points or vertex points...

 

 


david_r
Celebrity
  • 8394 replies
  • June 1, 2018
@david_r,

 

 

thank You so much, I forgot that NeighbourFinder can calculate distance between points... And what if I want to check, if lines connected to each other are connected only through end-points or vertex points? I need to detect lines, which are spatially connected, but not through end-points or vertex points...

 

 

Maybe use the Chopper with max vertices = 1 to get point geometries on all vertices. Then pass the lines through the TopologyBuilder and compare the Nodes with the output from the Chopper (e.g. PointOnPointOverlayer and check _overlaps value).

lazarlubomir
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 165 replies
  • June 1, 2018
@david_r

Im not sure if this is right way. I attached the sample, where You can try it. Still, if one line touches another one by end point, but second one has no end point or vertex point at touch location, there is overlaps with end point of first line :-(

abc.zip


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • June 1, 2018

@lazarlubomir

extract begin and end coordinate of each line.(parallel so as to have same name for x and y coordinates).

Listbuilder (or aggregator) group by x and y.

Listelementcount =1 are endpoints and not matching other vertices.

But of course you need to take notice your example has Paths. So if you follow above procedure you will notice the network is topologicaly correct. Result will therefore also yield points on paths.


lazarlubomir
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 165 replies
  • June 1, 2018

@lazarlubomir

extract begin and end coordinate of each line.(parallel so as to have same name for x and y coordinates).

Listbuilder (or aggregator) group by x and y.

Listelementcount =1 are endpoints and not matching other vertices.

But of course you need to take notice your example has Paths. So if you follow above procedure you will notice the network is topologicaly correct. Result will therefore also yield points on paths.

@gio,

 

thank You so much for idea. But it is only for endpoints, right? What if line is connected to another line by endpoint on first line and vertex point on second line? I attached pic below, which describe what Im looking for. I need to detect all lines connected to another lines, but not through end point or vertex point.

 

Thank You so much!

 

Lubo

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • June 4, 2018

@lazarlubomir

Hi,

You also need to extract all vertices in the process I described. Using same attribute names for the coordinates.

Listbuilder and listelementcounter.

Now test for to chelement_couint = 2


lazarlubomir
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 165 replies
  • June 4, 2018

@lazarlubomir

Hi,

You also need to extract all vertices in the process I described. Using same attribute names for the coordinates.

Listbuilder and listelementcounter.

Now test for to chelement_couint = 2

Hello @gio,

 

yes, it is a quite good solution, thank You so much! Probably, I found another solution -

 

1. convert all lines to points via chopper

 

2. pointonpointoverlayer and select points, where overlaps attribute value = 0

 

3. pointonlineoverlayer and select points, where overlaps attribute value is bigger than 1.

 

It looks that it works :-)