Skip to main content
Solved

measure length between points

  • February 15, 2019
  • 4 replies
  • 260 views

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

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.

View original
Did this help you find an answer to your question?

4 replies

takashi
Evangelist
  • 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
  • February 18, 2019
takashi wrote:

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
Evangelist
  • February 18, 2019
takashi wrote:

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
  • February 21, 2019
takashi wrote:

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

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