Skip to main content
Solved

Distance of junction points from a single point feature along a polyline.

  • June 23, 2015
  • 5 replies
  • 24 views

geospatiallover
Participant
Forum|alt.badge.img+6
I have a multi-part polyline with junction points along the line. I'd like to measure the distance of each junction points along the line from a single source point feature. All parts flow away from the source already. I am also trying to determine the length of each part from the starting point to the end point of each segment that branches off from the junction points.

 

.. 

Best answer by geospatiallover

I followed exactly what you said and took a good bit of time to undersand how the FromTo and Shortest PathFinder works. Thank you very much and I appreciate the help.
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.

5 replies

geospatiallover
Participant
Forum|alt.badge.img+6
Error on the drawing... the blue colored junction points were meant to be the end points of every junction and not a junction point.

takashi
Celebrity
  • June 24, 2015
Hi,

 

 

In the case of such tree structure graph, I would try using the ShortestPathFinder.

 

(1) Send the polyline to an Intersector or a TopologyBuilder to transform it into network lines.

 

(2) Create from-to lines for each junction point so that each line connects between a junction point and the source point.

 

(3) Add a ShortestPathFinder; send the network lines to the Neetwork port; send the from-to lines to the From-To port.

 

(4) Calculate the lengths of the resulting shortest paths. The length is the distance measured along the path between a junction and the source.

 

 

Takashi

geospatiallover
Participant
Forum|alt.badge.img+6
Deleted the previous comment and replaced with this. 

 

 

Thanks for the quick response and I really appreciate your help. I got it to work somewhat but there must be something wrong with my network. Noticed two problems: the From To Builder builds paths "as the crow flies" from the source to each junction. Secondly, my results does not get into the Path output port of the ShortestPathFinder.  I would think that the two are related. Please comment on my workspace when you have a chance. Below is a picture of my workspace:

 

 

 

 

 

takashi
Celebrity
  • June 24, 2015
There could be a problem on parameter setting of the FromToBuilder. Try using this process, instead of the transformer. This process is basically the same as the transformer definition.

 

 

(1) Extract coordinate (_x, _y) of the source point with a CoordinateExtractor.

 

(2) Add a FeatureMerger to merge the coordinate (_x, _y) to every junction point unconditionally.

 

Junction points --> Requestor

 

Source point --> Supplier

 

Join On: <set the same value (e.g. 1) to both requestor and supplier so that the unconditional merging will be performed>

 

(3) Connect a VertexCreator to the Merged port of the FeatureMerger to add the source point to each node point.

 

Mode: Add Point

 

X Value: _x

 

Y Value: _y

geospatiallover
Participant
Forum|alt.badge.img+6
  • Author
  • Participant
  • Best Answer
  • June 24, 2015
I followed exactly what you said and took a good bit of time to undersand how the FromTo and Shortest PathFinder works. Thank you very much and I appreciate the help.