Question

Finding beginning and ending intersecting streets

  • 5 November 2018
  • 6 replies
  • 5 views

Hello Everyone,

I have a network of local roads and I need to find the intersecting "from" and "to" streets for select road segments.

For example, in the following image, for the circled segment of Hendon Ave, I need to be able to identify that the segment goes from "Grantbrook St" to "Carney Rd". Order doesn't matter. It could be from Carney Rd to Grantbrook St.

My network is fully segmented at each intersection. Each segment has the attributes "from_node" and "to_node". The image below shows a typical segment within the network.

I am having a hard time identifying the "from" and "to" streets.

I tried using spatial relator, which successfully gives me the related candidates. But in a case like this, I will get 4 related candidates.

I considered using linejoiners to join Street B and Street A, but I will lose the from_node and to_node information. That information is useful when I have more than 4 related candidates. For example, for 4 way intersections on both ends.

The result I need is strictly the following. The node information is not required.

Road Segment From To

Street C Street B Street C

 

Any help will be appreciated!


6 replies

Userlevel 1
Badge +10

Have you tried using the listduplicateremover to remove the duplicate road names from your list output created by the spatialrelator?

Badge +3

 

 

I think he wants to query his network by from-to streetnames

 

 

@fariyafarhad

 

You could calculate the routes and query those wich have 2 nodes.

So if your network is correct you could create a from to line by picking a point on each line and connecting them. Then feed this to the shortest pathfinder.

Query result for solutions with just 2 nodes...

(of course any route with more nodes is excluded).

 

You can also query the streets for nodes.

Then query the rest of the network lines to see if they contain a combination of a node from A with a node from B.

 

sample post?

Have you tried using the listduplicateremover to remove the duplicate road names from your list output created by the spatialrelator?

Hello @egomm

Thanks for the suggestion! This is really useful when we only have two intersecting lines per segment :)

 

 

I think he wants to query his network by from-to streetnames

 

 

@fariyafarhad

 

You could calculate the routes and query those wich have 2 nodes.

So if your network is correct you could create a from to line by picking a point on each line and connecting them. Then feed this to the shortest pathfinder.

Query result for solutions with just 2 nodes...

(of course any route with more nodes is excluded).

 

You can also query the streets for nodes.

Then query the rest of the network lines to see if they contain a combination of a node from A with a node from B.

 

sample post?

Hello @gio Sorry I didn't quite understand. The feature I have are street lines. The nodes are attribute values of the lines. I don't actually have the nodes.

Userlevel 1
Badge +10

Hello @egomm

Thanks for the suggestion! This is really useful when we only have two intersecting lines per segment :)

Do you have an example of how you want to treat other scenarios?

Badge +22

I would probably do it with the TopologyBuilder (assume clean data, propogating attributes).

On the Node output keep the _nodes_angle{}.StreetName and the node_number attributes.

FeatureMerger with the Edge as the Requestor, and the Node as the Supplier, Join on _from_node and node_number.

On the Merged port, manipulate the list to remove all elements that have a streetName the matches that of the segment. (I would use python for this). ListHistogrammer to get the remaining unique street names at that node. If the histogram has one element, then that's your from_street. If there is more than one element, you need further logic (what happens if Main St turns into Thompson at the intersection of 1st avenue, what is the from street for 1st ave?)

 

After that, repeat with FeatureMerger, etc, but Join on the _to_node (use all the nodes as the supplier, not just the unusedSupplier from the previous featureMerger)

 

Reply