Skip to main content
Question

Lines connected?


Forum|alt.badge.img

How can i check, if all my lines are ahve a connection to each other. I have a net of multilines and i want check that all lines have a connection to min. 1 neighborline. Case: Can the bus drive from point 'a' to the point 'b' without any interrupt way/lines.?

16 replies

david_r
Evangelist
  • April 5, 2017

Try using the NetworkTopologyCalculator. You should only have a single value of "_network_id" on the output features. If you have more than one value, you have disconnected edges.

Be aware that a connection is defined by start/end-node only, meaning that two intersecting lines (like an X) doesn't necessarily mean that they are topologically connected.

You can use the TopologyBuilder to force connections at all intersections. Sometimes a Snapper can also be useful as a pre-processing tool if you have some tiny gaps in your line connections.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 5, 2017

The NetworkTopologyCalculator will assign a unique ID to every set of connected lines. You can aggregate or use the statisticsCalculator on the _network_id to get a count per network.

 

 

Alternatively you can use the topologyBuilder to identify nodes that have only one connection (dangle nodes) and then identify the lines where both nodes are dangle to get isolated lines.

For the use case of driving a bus from point a to point b you can use the ShortestPathFinder, if a route is not possible it will come out of the NoPath port.


redgeographics
Celebrity
Forum|alt.badge.img+47

I used a different approach: SpatialFilter set to "Filter TOUCHES Candidate" and then input the lines as both Filter and Candidate.


david_r
Evangelist
  • April 5, 2017
redgeographics wrote:

I used a different approach: SpatialFilter set to "Filter TOUCHES Candidate" and then input the lines as both Filter and Candidate.

Will that work for crossing lines that has no intersection node?

redgeographics
Celebrity
Forum|alt.badge.img+47
david_r wrote:
Will that work for crossing lines that has no intersection node?
That's being passed as "failed", that makes sense I think (if it's not intersecting it's not connected to the network). If you do want to make those lines part of the network an Intersector will sort that out.

 

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 5, 2017
david_r wrote:
Will that work for crossing lines that has no intersection node?
It will pass T intersections that are not properly noded, but will fail X intersection.

 

 


itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • April 5, 2017

Yet another approach would be to use the LIneJoiner, the join will take place only where segments are properly connecting.


david_r
Evangelist
  • April 5, 2017
itay wrote:

Yet another approach would be to use the LIneJoiner, the join will take place only where segments are properly connecting.

What if you have more than 2 lines joining at a single node?

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 5, 2017
itay wrote:

Yet another approach would be to use the LIneJoiner, the join will take place only where segments are properly connecting.

Could you explain how the Linejoiner would identify isolated segments?

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • April 6, 2017

@jdh "Could you explain how the Linejoiner would identify isolated segments?"

Generate a list on the LineJoiner. List with 1 element (object itself) will have not joined to anyone.

 

Use ListElementCounter


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • April 6, 2017
gio wrote:

@jdh "Could you explain how the Linejoiner would identify isolated segments?"

Generate a list on the LineJoiner. List with 1 element (object itself) will have not joined to anyone.

 

Use ListElementCounter

Every segment connected at a node with 3 or more elements will also not have joined to anyone.

 

 


Forum|alt.badge.img
david_r wrote:

Try using the NetworkTopologyCalculator. You should only have a single value of "_network_id" on the output features. If you have more than one value, you have disconnected edges.

Be aware that a connection is defined by start/end-node only, meaning that two intersecting lines (like an X) doesn't necessarily mean that they are topologically connected.

You can use the TopologyBuilder to force connections at all intersections. Sometimes a Snapper can also be useful as a pre-processing tool if you have some tiny gaps in your line connections.

The snapper works nice in 50% case. So i want flag the lines and correct it self. How i can i transform the multilines/polylines to singlelines?

 

 


Forum|alt.badge.img
redgeographics wrote:

I used a different approach: SpatialFilter set to "Filter TOUCHES Candidate" and then input the lines as both Filter and Candidate.

They not show lines who cross another line without a same node. Its important that i also this lines. Idea to complete the script?

 

 


david_r
Evangelist
  • April 7, 2017
ivopaffrath wrote:
The snapper works nice in 50% case. So i want flag the lines and correct it self. How i can i transform the multilines/polylines to singlelines?

 

 

Depends on what you mean by multilines, but if you want to split lines at intersections you can either use the TopologyBuilder or the Intersector.

 

There is also the Chopper, but I suspect that's not what you want?

david_r
Evangelist
  • April 7, 2017
ivopaffrath wrote:
They not show lines who cross another line without a same node. Its important that i also this lines. Idea to complete the script?

 

 

Use the TopologyBuilder.

Forum|alt.badge.img
david_r wrote:

Try using the NetworkTopologyCalculator. You should only have a single value of "_network_id" on the output features. If you have more than one value, you have disconnected edges.

Be aware that a connection is defined by start/end-node only, meaning that two intersecting lines (like an X) doesn't necessarily mean that they are topologically connected.

You can use the TopologyBuilder to force connections at all intersections. Sometimes a Snapper can also be useful as a pre-processing tool if you have some tiny gaps in your line connections.

Topology Builder -> Network Builder ->

 

Control with ShortestPathFinder

 

Thx @all!

 


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