Skip to main content
Question

measure line length from point to point


Forum|alt.badge.img

Can anyone help with the easiest way to do this within FME? I have a 2 point shapefiles (A and B) and 1 line shapefile (C). Within shapefile A, each point is associated with one point in shapefile B (ex: points oid 1,5,6,8 belong to point oid 2 in shapefile B. I am wanting each independent distance from point 2 to each associated point (points 1,5,6,8). These points all fall on the same line. I've looked at using pointonlineoverlayer and measure generator, but I am missing something in the process and not getting the results I need.

Thanks!

5 replies

Forum|alt.badge.img

So I'm looking for distance from HOU_CLUSTER 1 point to each selected point.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • July 6, 2017

Have you looked at the ShortestPathFinder?


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • July 6, 2017

As @jdh mentioned the ShortestPathFinder is the transformer that should be able to do this, if your lines network is closed.

If that is not the case the Snapper can help closing the network.

If you look for the distance from each point to the CLUSTER, not over a connected network, the NeighborFinder should be used (I notice in the image not all points are connected by a network to the cluster).


webservicessia
Contributor
Forum|alt.badge.img+1

Hi,

Have you tried Lenghtcallculator ?


takashi
Influencer
  • July 6, 2017

Hi @laceymorris, assuming that the lines belong to a connected network, you can set measures which indicate the distances from the common starting node (say "source") with the NetworkCostCalculator (Output Optimal Cost As: Measures), and then transfer the measure value to a point feature which is on a network node or line with the PointOnLineOverlayer. The measure value of a point can be extracted as a feature attribute with the MeasuerExtractor (Type: Point).

If the lines don't form a network, consider using the TopologyBuilder to construct a network beforehand.


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