4

I have a line that I ultimately want to split up into points. The points should be every 100 meter along the line. So I don't want to extract the nodes.

Are there any Open Source (QGIS, Python) tools around for that?

The use case is that I have a bus line without bus stops. Though I know every 100 meter the bus stops. This way I want to generate bus stops to use as a GTFS feed.

5

3 Answers 3

7

May be an alternative to the suggestion AndreaJ gave- Have look at

Station Lines

N.B. This tool expects projected coordinate systems for the feature to be splitted by planar length unit.

SL

3
  • Awesome! I just tested this plugin and it's pretty useful. Good shout!
    – Joseph
    Feb 3, 2015 at 13:53
  • Looks very interesting. Though it doesn't have any metadata what it does or what the input parameters are. Would you mind . Would you mind adding a little example on how to use it?
    – ustroetz
    Feb 3, 2015 at 14:02
  • To get points, you can create buffers around the station lines, then calculate the centroids of the buffers.
    – AndreJ
    Feb 3, 2015 at 15:56
5

You can use the Convert lines to points tool (you need SAGA GIS installed and the processing toolbox plugin enabled) and set your distance:

Convert lines to points

This is what I received for my line layer:

Line and points

I used the Measure Line tool from the toolbar to do a quick check between points:

Measured line

Hope this helps!

5
  • 1
    This tool seems to preserve all the vertices of the original linestring and add more points to long segments. Maybe it does not give an exact solution to the question So I don't want to extract the nodes
    – user30184
    Feb 3, 2015 at 14:32
  • 1
    GRASS v.split.length or v.to.points from the same processing toolbox might be better tools.
    – AndreJ
    Feb 3, 2015 at 16:02
  • @AndreJ, I agree although you would have to be careful with v.split.length. As it spits out a line layer, when converting this to points it will give duplicates on the inner vertices of the entire line (since each segment has a start-and-end). Atleast this is what happened to me when I tried it. But v.to.points should work.
    – Joseph
    Feb 3, 2015 at 16:07
  • You can buffer and centroid the duplicates. v.to.points does not split, if that is needed.
    – AndreJ
    Feb 3, 2015 at 16:10
  • @AndreJ, yup true. Very simple extra steps.
    – Joseph
    Feb 3, 2015 at 16:13
3

Can be done with OpenJUMP and linear referencing tools. Select the line layer first.

enter image description here

Fill in the parameters

enter image description here

Results go to a new point layer. Points are at equal intervals along the line, original vertices are dropped. Start and end nodes can be preserved if desired.

enter code here

2
  • Very nice and simple! I should use OpenJUMP more often.
    – Joseph
    Feb 3, 2015 at 14:25
  • I wish we could have those ideas in QGIS plugins as well!
    – AndreJ
    Feb 3, 2015 at 15:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.