4

I have a .shp of lines where I'm able to calculate the sum of segments length but I'm trying to put a point at a given distance in meters.

The problem is it puts a point at every segment. When I give it the instruction to put a point at 10000m, if the segment is 9000m long, then it will put a point at the end, it will not pass to the next segment.

How can I iterate on each segments? Like:

for elem in elems():
  if (distance given = length)
    put a point 
  else 
    distance = distance - length
    ## then the loop continue to the next segment with a new distance

Or maybe another way to do this?

  • Do you want to create a point or to insert a vertex? One image it would be useful to show the details of your request. – xunilk May 16 '16 at 21:57

Your Answer

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

Browse other questions tagged or ask your own question.