Hi I have a road segment line/polyline dataset that I need to split for each segment object into 10m intervals and create a new record. What's the best way to go about this?
Thanks in advance
Tim
Hi I have a road segment line/polyline dataset that I need to split for each segment object into 10m intervals and create a new record. What's the best way to go about this?
Thanks in advance
Tim
Hello @Tim Warfe try the chopper transformer
http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/chopper.htm
Thank you @deanhowell , it's not chopping the segments into 10m slices, maybe I'm doing the settings wrong or my input data isn't quite right??
Do you have a sample of the data you can share and the workbench and I would be happy to have a look to see what might be going on?
Thank you @deanhowell , it's not chopping the segments into 10m slices, maybe I'm doing the settings wrong or my input data isn't quite right??
I believe the length value in the Chopper is in ground units, meaning that if the lines aren't already projected to a coordinate system using meters, the result is probably not going to be correct.
Thank you @deanhowell , it's not chopping the segments into 10m slices, maybe I'm doing the settings wrong or my input data isn't quite right??
@Tim Warfe Chopper's Mode parameter sets whether it's chopping by vertex count or length. But as @david_r mentions you may need to reproject your data - CommonLocalReprojector eliminates the need to choose a coordinate system. Don't forget to reproject back to the original one - Reprojector.
Thank you so much for your replies so far. @deanhowell @Mark Stoakes @david_r I can't seem to get the result I was after. I've added the FMW and a subset of the data source I'm working with. Can someone please take a look? thnaks in advance. :)
Workspace
Hello @Tim Warfe , To be honest I am not sure why the chopper is not working and probably worth SAFE looking into that further. I did find a custom transformer caller "Distance Chopper" and that has done the trick perfectly. I added a line combiner into the mix so the lines were combined based on group and then used the distance chopper.
I have attached the modified workbench for you to review. I hope this helps.
Regards
Dean
Hello @Tim Warfe , To be honest I am not sure why the chopper is not working and probably worth SAFE looking into that further. I did find a custom transformer caller "Distance Chopper" and that has done the trick perfectly. I added a line combiner into the mix so the lines were combined based on group and then used the distance chopper.
I have attached the modified workbench for you to review. I hope this helps.
Regards
Dean
If I'm not mistaken, the Chopper will split up the lines at the closest vertex to the selected distance. Meaning that if you have a line segment with e.g. 1000 meters between the vertices, and tell the Chopper to split every 10 meters, the result won't be what you may expect. I haven't looked at the data, but that could well be the case here.
As you mention, the DistanceChopper resolves this issue.
A big thank you to @deanhowell @david_r and @Mark Stoakes for your support on this issue. I seem to have the result I was after now. Happy camper here!! :)