I want to calculate the distance between a shp of points and a shp with a few polygons.
I am using MMQGIS (Hub distances), a UTM coordinate system, and everything works fine, but I think it is giving me the distance from each point to the center of each polygon and, since the shp of the polygon represents water courses, I would like to obtain the distance of each point to the "surface" of the polygon.
Because there are points very close to the water but the distance I obtain is very far way.
The yellow polygon represents almost the whole river, and there are points very cloe to the river but the distance I obtain is, for instance, 5 km.
How do I do solve this?
Best Answer
You are correct in that it calculates the distance between your points to the centroid of polygons/lines. You could:
Vector > Geometry Tools > Polygons to Lines
)Processing Toolbox > SAGA > Shapes - Points > Convert Lines to Points
)Hub distances
using your main points layer and the newly converted points layerOr you could try using the GRASS tool v.distance (
Processing Toolbox > GRASS commands > Vector > v.distance
)