Question

Find the Count of Overlapping/Valance nodes in a Polyline file

  • 2 November 2015
  • 8 replies
  • 5 views

Badge +1
Hi,

 

Since, I work with spatial data and more into ESRI formats, so I come along with different problems with the same format type, and again, I am stuck with a new problem here. Though, its a bit difficult to explain, yet, let me try:

 

I have a Road Network with Polyline geometry. Each Road Network Element (line segment) has a start and an end node. If we split the line at junctions/intersections and add a point to each start an end node to each Line Segment, there will be a certain number of overlapping nodes (image below).

 

My question is will I be able to extract the count of nodes at every junction?

 

Pl feel free to ask queries if I am not able to communicate properly.

 


8 replies

Badge +21
Use a SpatialRelator with the same data as Requestor and Supplier. You will then get a _related_candidates with the number of overlapping nodes
Badge +21
@hellblazer
Userlevel 4
Hi

 

 

Take a look at the TopologyBuilder. Using the output lines, count the number of uniquely occurring values in from_node and to_node, this count will give you the number of connections for each node ID.

 

 

David
Userlevel 1
Badge +21
You could also use a matcher to find overlapping nodes, outputting via the singlematched output port and setting the "match count attribute on singlematched output" will give you a count of nodes at each location.
Badge +1
Hi,

 

Thanks everyone for the advices and help!! :)

 

 

@sigtill Though, i did try your method, but I guess I was making a very minute mistake somewhere. I tried using Intersector (for generating nodes out of lines) and SpatialRelator (to obtain the Valance counts in _related_candidates).

 

 

@david_r I did try TopologyBuilder and found all my _from_node and _to_node unique. I am not sure how I can move ahead with this.

 

 

@egomm I tried using Matcher but didn't find the solution. Can you explain a biy more

 

 

 

Apart from this, I tried using Intersector (to get the nodes and to split the line at junctions) and PointOnLineOverlay. Under the _overlap, I got the desired result. Yet, it is under testing.

 

Userlevel 1
Badge +21
Use a LineOnLine overlayer to split lines into segments where they meet/cross other lines, create points at start and end points of the resulting line output, then the matcher to count how many points are in the same location
Userlevel 4
Hi

 

 

Using the TopologyBuilder works for me. I could even simplify it a bit using only the output nodes and then counting the elements in the _node_angle{} list:

 

 

 

 

Here's the relevant part of the workspace:

 

 

 

 

David

 

Badge +3
-Topology builder, ie. like David shows.

 

-Network to create from to's. Compare etc. like below.

 

 

-Or old style: vertex-extraction (start and end)

 

Listbuilder grouped by line_id.

 

Then unconditional merger.

 

Then compare end_node to start_node. (x,y comparison). Count em.

 

 

Wichever you use, it involves list-functions.

Reply