I am interested in how to get a given point distnce with FME.
I have points arranged by counter (pontID is ascending) and I want to get the next point's distance. I tried NeighborFinder, but the problem is that sometimes an other point is closer,so it gives a wrong distance.
Thanks!
Best answer by ebygomm
Another way, if the points are in order
Coordinate extractor to get coordinates if they don't already exists as attributes
Attributecreator with adjacent feature mapping turned on look at one subsequent feature
Arithmetic expression to calculate distance using the coordinates of the existing feature, and the coordinates of the adjacent feature
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.
Like so. Use LineBuilder to also act kind of like a Chopper by pairing the Points first by making a copy of the Points with ID incremented by +1, and then creating Line segments. The LengthCalculator will the measure the distance between the line vertices.
*EDIT* And just realised how similar this solution is to the concepts from @david_r and @ebygomm! Without meaning to, I ended up sketching a hybrid of the 2 solutions. In theory @ebygomm 's solution will be a bit more efficient, although I'm not sure whether NeighborFinder's distance is a Geographic or Cartesian calculation? I went to building Lines instead to make sure the right length for the coordinate system could be extracted. I think the Help implies it is a Cartesian distance only whereas I think the solution you wanted was a Geographic distance that accounted for surface curvature?