Skip to main content

Hi,

I would like to break a line into segments and then assign a sequential order attribute starting at the start of the line.

For example, in my screenshot, if I break the line into 500m segments, I would like section 1 to go from the start point to 500m, section 2 to go from 500m to 1000m, and so on to the end of the line.

I've tried using the iterative snipper and the chopper to break the line but the problem is that they both output the line segments in a random order.

Would anyone know how I might do this?

Thanks.

 

The lines coming out the iterative snipper should come out in the correct order so it is odd that they don't. Is the line as single line, or is it a multipart geometry/path?

You could set a measure on the line using a measuregenerator, then use a measureextractor to get the measure at the start point of each snipped line which you could then use to order the lines


The lines coming out the iterative snipper should come out in the correct order so it is odd that they don't. Is the line as single line, or is it a multipart geometry/path?

You could set a measure on the line using a measuregenerator, then use a measureextractor to get the measure at the start point of each snipped line which you could then use to order the lines

I double checked and it is in fact a multipart geometry/ path and not a single line after all.

Do you think it's still doable?


I double checked and it is in fact a multipart geometry/ path and not a single line after all.

Do you think it's still doable?

Is it a IFMEPath or an IFMEMultiCurve or something else? The iterative snipper will not treat aggregate geometries as a single line


Is it a IFMEPath or an IFMEMultiCurve or something else? The iterative snipper will not treat aggregate geometries as a single line

It's an IFMEMultiCurve.

Will another approach work?


It's an IFMEMultiCurve.

Will another approach work?

Are you able to share the geometry? It may be that it is a multicurve but could be converted to a path. If they're actually discrete line segments then you need to decide how you would want them to be snipped, since the logic of every 500m does not work if they're actually separate lines.


Are you able to share the geometry? It may be that it is a multicurve but could be converted to a path. If they're actually discrete line segments then you need to decide how you would want them to be snipped, since the logic of every 500m does not work if they're actually separate lines.

I can share. Here it is as a .shp.

ifmemulticurve.zip


You need to decide what to do with these two parts.

If you deaggregate the multicurve and drop these two parts, you can then recombine to form a single line which you can use the iterative snipper on, and the parts will come out in order


You need to decide what to do with these two parts.

If you deaggregate the multicurve and drop these two parts, you can then recombine to form a single line which you can use the iterative snipper on, and the parts will come out in order

Of course!

Thank you for your help.


@smcd84 It seems that IterativeSnipper should have a segment count, so I've modified it in this workspace (FME 2020): iterativesnipperexample.fmwt

As @ebygomm suggests, you'll have to deaggregate and then LineCombine your IFMEMultiCurve for that to work.


@smcd84 It seems that IterativeSnipper should have a segment count, so I've modified it in this workspace (FME 2020): iterativesnipperexample.fmwt

As @ebygomm suggests, you'll have to deaggregate and then LineCombine your IFMEMultiCurve for that to work.

Excellent. Thank you.


Reply