Skip to main content
Solved

How to move a point along a line so that it is exactly X cm away from another point?

  • December 11, 2025
  • 5 replies
  • 34 views

jugoslaviaa
Enthusiast
Forum|alt.badge.img+6

Hi everyone,

I have a geometry problem in FME and I’m not sure about the best workflow.

In the image below, the red point belongs to a feature that is connected to a black point (the black point is the reference).
What I need to do is:

  1. Take the line highlighted in green.

  2. Starting from the black point, find a position 10 cm along the line.

  3. Move (or recreate) the red point exactly at that location — meaning:

    • the new point must lie on the line,

    • and must be 10 cm away from the black point.

I know the relationship between the red point and the black point from an ID attribute, but my problem is:
How do I calculate this “point on line at 10 cm distance” inside FME?


 

 

Best answer by geomancer

Maybe this can be a start?

  1. Create a buffer (polygon) of 10 cm around the black points;
  2. Turn these polygons into lines with a GeometryCoercer;
  3. Intersect these new lines with your original green line using a LineOnLineOverlayer;
  4. The intersection gives you the new location of the red point.

 

5 replies

geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • Best Answer
  • December 11, 2025

Maybe this can be a start?

  1. Create a buffer (polygon) of 10 cm around the black points;
  2. Turn these polygons into lines with a GeometryCoercer;
  3. Intersect these new lines with your original green line using a LineOnLineOverlayer;
  4. The intersection gives you the new location of the red point.

 


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • December 11, 2025

@geomancer It would only work if the black point lies on the start or end point of the line, which is not always the case. In that situation, it creates two points because the buffered polygon intersects the line at two locations.


geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • December 11, 2025

Of course. Can you determine which of those two intersections to keep?

Perhaps by calculating the distance between each of the two locations and the black point, and only keeping the nearest (or the furthest) point?

 


jugoslaviaa
Enthusiast
Forum|alt.badge.img+6
  • Author
  • Enthusiast
  • December 11, 2025

Of course. Can you determine which of those two intersections to keep?

Perhaps by calculating the distance between each of the two locations and the black point, and only keeping the nearest (or the furthest) point?

 

Unfortunately I cannot.. I will try with distance comparance then. Thanks!


geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • December 11, 2025

Or maybe the location that is nearest to the original red point?

Good luck!