To simplify, I have a line that is 500 meters long. As part of its attributes 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 changes.

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 intersects it.


There is a really simple method for doing this. The steps are as follows:

  1. Use a MeasureGenerator to add a measure to your line (ensure your coordinate system units are metres). Note, you will want to do this prior to snipping the line into 20m segments.

    enter image description here

  2. Use the IterativeSnipper transformer to chop the line into 20m segments. All of the segments will have the measure associated with them. Note, you may have to download this transformer from the FME Store under the Linear Referencing category. It's a free download as of FME 2013, I think.

    enter image description here

  3. Use a measure extractor to extract the measure of the first vertex. This is specified by Index 0. Store the measure in an attribute called something like "start_measure". Use the same source measure name that you specified in the MeasureGenerator. enter image description here

  4. Use another MeasureExtractor to extract the measure of the last vertex. Same as above, but use -1 as the index.

    enter image description here

The full workspace looks like this: (note, I used a creator transformer to create a 500m line, but this will work on any polyline). enter image description here

Also, you might want to have a look at this question I asked which is similar to what you want to do.

  • same answer that i had , but much better. Jan 8 '14 at 8:43

Measuregenerator may do waht you want, if not then use MeasureSetter (vertex by vertex if you have one long line)

  • would add a counter from 0 to verify the sequence of vertices (depends on the shape of the line - think river forks).
    – Mapperz
    Jan 7 '14 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.