How can I get the distances from each point at a shapefile to the nearest line from another?

I've tried to follow the directions from Measuring the distance between lines and points in QGIS and Shortest distance from point to line (big dataset), but both methods didn't worked.

I'm using QGis 2.4 (Chugiak)



1 Answer 1


If you can't get v.distance to work (it should be available through the GRASS plugin), you could try the NNJoin plugin that I uploaded to the QGIS plugin repository recently.

The NNJoin plugin does not use spatial indexes for line layers, so it is not practical if you have large datasets.

Edit: The current version of the NNJoin plugin can use spatial indexes also for polygon and line layers, so its performance has improved for large line and polygon datasets.

  • Thanks, I've already solved using Geotools to write a java app
    – ebarbara
    Commented Oct 1, 2014 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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