In QGIS I am trying to calculate the distance from a point layer to a polyline layer for the n nearest polylines. I have figured out how to calculate this distance to the centroid of the polylines using the point to hub tool, but I need the distance to the edge of the closest polylines – not centroids. I can calculate the nearest polyline by dumping the polylines to nodes and calculating to nearest point, but that method falls apart for the n nearest calculation.
Any thoughts?
Best Answer
You can use the NNJoin plugin to calculate the distance between points and its nearest line. You can download the plugin via Plugins > Manage and Install Plugins....
It is recommended, however, to not use this plugin on large datasets containing lines as it does not use a spatial index for lines.