1

Similar to this question I have a set of polylines that I need to be split by a equal distance. How do I do this with QGIS, gdal/ogr2ogr and other open source tools (on Mac)? I don't have access to ArcGIS, therefore not a duplicate question, I hope.

I figured out to extract the coordinates at a specific distance from start of a line with this in QGIS (1000 m from start):

 x(line_interpolate_point($geometry, 1000))
 y(line_interpolate_point($geometry, 1000))

From there I'm not sure how to continue.

I need this to be able to create points along contour lines where I can extract angle and elevation value (from attribute). See this question and answer where I need this information.

oskarlin
  • 1,941
  • 1
  • 28
  • 45

1 Answers1

2

There is a GRASS plugin under QGIS to split the polyline by specific length. The tool "v.split.length - Split lines to shorter segments by length" does exactly what you are asking for, as you can see below:

enter image description here

Under the Maximum segment length, you need to specify the desired length. In this example it is specified every 500 meters.

Before split:

enter image description here

After applying split tool:

enter image description here

You need to make sure that your data is projected to a suitable spatial reference that uses meters or feet. However, it may not give the desired length if the lines are complex or have some topological errors.

ahmadhanb
  • 40,826
  • 5
  • 51
  • 105