Skip to main content
Question

How to split lines at 10m intervals?

  • November 9, 2020
  • 10 replies
  • 664 views

timwarfe
Contributor
Forum|alt.badge.img+9

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

10 replies

deanhowell
Influencer
Forum|alt.badge.img+24
  • Influencer
  • 315 replies
  • November 9, 2020

timwarfe
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • 10 replies
  • November 10, 2020

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


deanhowell
Influencer
Forum|alt.badge.img+24
  • Influencer
  • 315 replies
  • November 10, 2020

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?


david_r
Celebrity
  • 8392 replies
  • November 10, 2020

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.


Forum|alt.badge.img+2
  • 1891 replies
  • November 10, 2020

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.


timwarfe
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • 10 replies
  • November 16, 2020

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. :)


timwarfe
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • 10 replies
  • November 16, 2020

Workspace


deanhowell
Influencer
Forum|alt.badge.img+24
  • Influencer
  • 315 replies
  • November 16, 2020

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


david_r
Celebrity
  • 8392 replies
  • November 16, 2020

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.


timwarfe
Contributor
Forum|alt.badge.img+9
  • Author
  • Contributor
  • 10 replies
  • November 17, 2020

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!! :)