Skip to main content
Solved

measure length between points

  • February 15, 2019
  • 4 replies
  • 312 views

arthy
Contributor
Forum|alt.badge.img+8
  • Contributor
  • 101 replies

Hello,

 

Let's assume that I have a series of 2D-points A1, A2, A3, A4, ... An.

Can anyone tell me how to create a measure between such points so that:

- the measure for A1 is 0

- the measure for A2 is d(A1,A2) i.e. the distance between A1 and A2

-the measure for A3 is d(A1,A2) + d(A2,A3)

- the measure for A4 is d(A1,A2) + d(A2,A3) + d(A3,A4)

and so one?

Thanks,

Best answer by takashi

A possible way is to use the LineBuilder to create a single line from the points, the MeasureGenerator to add measure to every vertex of the line, then the Chopper to decompose the line into individual vertex points (i.e. the original points) having measure.

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.

4 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • February 16, 2019

A possible way is to use the LineBuilder to create a single line from the points, the MeasureGenerator to add measure to every vertex of the line, then the Chopper to decompose the line into individual vertex points (i.e. the original points) having measure.


arthy
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 101 replies
  • February 18, 2019

A possible way is to use the LineBuilder to create a single line from the points, the MeasureGenerator to add measure to every vertex of the line, then the Chopper to decompose the line into individual vertex points (i.e. the original points) having measure.

@takashi

Thanks for your answer. I don't know why but I did tried what you suggest even before posting my question. One concern that I had was the fact that no measure was returned when using the MeasureGenerator Transformer. What did I do wrong in my workspace?

 

 


takashi
Celebrity
  • 7843 replies
  • February 18, 2019

A possible way is to use the LineBuilder to create a single line from the points, the MeasureGenerator to add measure to every vertex of the line, then the Chopper to decompose the line into individual vertex points (i.e. the original points) having measure.

I think every vertex of the resulting line should have measure named "Length".

Check if the vertices have measure with the Feature Information window in FME Data Inspector.


arthy
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 101 replies
  • February 21, 2019

I think every vertex of the resulting line should have measure named "Length".

Check if the vertices have measure with the Feature Information window in FME Data Inspector.

@takashi

I just figured out that an LRS-measure does not appeared as an attribute but instead like a coordinate value.

 

Thanks for ypour help