Skip to main content
Question

chop the lines by length

  • January 7, 2020
  • 7 replies
  • 497 views

Forum|alt.badge.img

Hi!!! I have a project need to cut these (M)lines by length

for example: there are line 1 is 13 miles long and line 2 is 16 miles long.

I need to chop these 2 line by every 5 miles. as I have picture below, line 2 begin measure at 3th mile not 0.

any idea how to do this? thanks

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.

7 replies

pratap
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 605 replies
  • January 7, 2020

Hi,

Have you tried "Chopper" with mode "as Length "?


Forum|alt.badge.img
  • Author
  • 13 replies
  • January 7, 2020

Hi,

Have you tried "Chopper" with mode "as Length "?

yes, I did but the chopper cut lines start measure at 0.

I would like they continue measure whatever previous line left (as picture)


pratap
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 605 replies
  • January 7, 2020

yes, I did but the chopper cut lines start measure at 0.

I would like they continue measure whatever previous line left (as picture)

In the example provided, after 3 miles (in Line#1) you are considering 2 miles from other line (from Line#2).

Are you sure that line #1 does not have break at intersection in entire data?


Forum|alt.badge.img
  • Author
  • 13 replies
  • January 7, 2020

In the example provided, after 3 miles (in Line#1) you are considering 2 miles from other line (from Line#2).

Are you sure that line #1 does not have break at intersection in entire data?

Hi pratap,

look like chopper just chop existing vertex. So if you have a polyline with a great distance between vertices, your results might be very approximate....: https://knowledge.safe.com/questions/36693/problems-with-chopper-when-trying-to-chop-by-lengt.html

so i don't think chopper is not tool for my case


pratap
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 605 replies
  • January 8, 2020

Hi pratap,

look like chopper just chop existing vertex. So if you have a polyline with a great distance between vertices, your results might be very approximate....: https://knowledge.safe.com/questions/36693/problems-with-chopper-when-trying-to-chop-by-lengt.html

so i don't think chopper is not tool for my case

We can use Densifier and add vertices as required and remove later.

But are you sure that line #1 does not have break at intersection in entire data?


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

@knfme2019 Are you sure Chopper By Length doesn't give you what you need? For each line that is chopped, it preserves the original measures. Perhaps include a small example dataset and show the community the results you'd like to see.


takashi
Celebrity
  • 7843 replies
  • January 12, 2020

Hi @knfme2019, I think the difficulty is that the two lines are not connected at their end nodes.

A possible way I can think of is, create a network topology from the two lines with the TopolgyBuilder, find the shortest path from the start node to the end node with the ShortestPathFinder, and then split the path into segments having an identical length with the LineDivider (from FME Hub).

See also this workspace example that demonstrates the procedure above: chop-lines-by-length.fmw (FME 2019.2.2)

Result