When I use Polygon centroid tool, points aren't always inside polygon, because some polygons have weird shape with holes inside them. I have big amount of polygons and I need to use this tool and I need all centroids to be inside polygons. Is there any way how can I make them to be inside polygons?
[GIS] Using Polygon centroids tool – points aren’t always inside polygon, can I fix that
centroidsgeometrypolygonqgistools
Best Answer
QGIS (at least in 3.0+) has a
pole_of_inaccessibility
function you can use.or if you just require a point that is within the polygon you could use the
point_on_surface
function:This shows the differences - red is pole of inaccessibility, green is point on surface and blue is centroid.