11

I have a polyline (movement path) and points recorded along the line. I would like to calculate for each point the distance along the line in Quantum GIS. I hope for a result which will add a new column to the point attribute table indicating the distance along which it is on the line. I'd appreciate any thoughts.

Mike.

11

If you'd like to go with the GRASS plugin, there's a module v.distance that does just that. First you'll bring the polyline and point layers into GRASS using the v.in.ogr module in the GRASS Toolbox. Then locate the v.distance module. The From and To vectors are obviously the points and line. Then select "Distance to nearest point ... along linear feature". You'll also need an attribute column name to accept the distance values (Use v.db.addcol to add that attrib if you don't already have). That should do it.

  • Many thanks Micha. Sorry I was away and could not give feedback before now. The v.distance module is exactly what I needed. Very many thanks. – Gabz Jun 3 '12 at 21:17
  • Note that the label currently reads (in QGIS 2.2) "Distance between points/centroids ... along this linear feature" – byteit101 Jun 25 '14 at 17:58
  • I can't seem to find this option/label anywhere in QGIS 3.2 Anybody has a clue if I'm wrong or if there is a workaround? So far, I couldn't find anything to resolve this issue in 3.2... – Horizen Oct 12 '18 at 22:10
2

Other way to measure this, it is using Qchainage (QGis plugin) to produce nodes equallly spaced from line. Then, you may use Distance to nearest hub (QGis plugin) to calculate distance among points.

Your Answer

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

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