Skip to main content

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.

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
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
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: ?

 

 


Hi Takashi,

 

what transformer would you recommend to place the expression 

 

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

 

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

 

 

Cheers,

 

 

Torro

Reply