Skip to main content
Question

assigning distance values to line segment lengths


Hi hope someone can help me.

 

To simplify, I have a line that is 500 meters long.  As part of its attibutes it has a attribute called 'Start Chainage' of 0 and an attribute called 'end chainage' of 500.

In FME I have used snipper to cut the line into lengths of 20 meters.

 

What I need is to give each one of those segments their own sequential start and end chanages.

So the first segment will have a start chainage of 0 and an end chainage of 20, the next segment will have a start chainage of 20 and end chainage of 40 and so on.....

The reason for this is so that I can identify at what point (chainage) along the road some other feature crosses or intesects it.

Thanks in Advance.

5 replies

david_r
Evangelist
  • January 7, 2014
Hi,

 

 

take a look at the Linear Referencing transformers in FME.

 

 

One possible solution might be to first use a MeasureGenerator on the 500m line, then the Snipper to cut it into 20m segment, then the MeasureExtractor to get the M-values (or chainages, as you call them) at the start and end of each segment.

 

 

David

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • January 7, 2014
Hi Torro,

 

 

I think the solution depends on how to divide original 500m line into 20m segments. If you applied "Cloner and Snipper" method discussed in the previous thread - Road Chainage, every segment has "_copynum" attribute (0-based sequential number), which indicates the snipping order from the start point of the original line. So, you can use it to calculate start / end chainage value. i.e. start = _copynum * 20, end = start + 20.   Sorry, I didn't look at your latest post in the previous thread. But I assume you divided the original line with the "Cloner and Snipper" method successfully.

 

 

Takashi

  • Author
  • January 9, 2014
Hi Takashi/David,

 

yes the cloner and snipper method worked well but im not sure how to get the start and end length of the line segments using MeasureExtractor.

 

What should I use as the Type: ?

 

 


  • Author
  • January 9, 2014
Hi Takashi,

 

what transformer would you recommend to place the expression 

 

(_copynum * 20, end = start + 20) to populate the attributes, Start and End Chainage?

  • Author
  • January 9, 2014
Hi Takashi,

 

its all good, used ExprssionEvaluator and all is worked ok.

 

 

Cheers,

 

 

Torro

Reply


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