How can I scale a polygon about his center? I find only transform function, but the scale function here can only move the polygon with the scale factor and don't enlarge it.
1 Answer
Except you have to do it for many polygons, I think the best solution is to establish a customized CRS and using v.transform
.
v.transform algorithm scales the feature from the coordinates origin of the layer CRS, and also can move a fixed distance all their vertices, or rotate them. But the reference is the CRS origin.
If you would prefer to calculate the new (scaled) coordinates of each vertex scaling vectors that start from the centroid towards each of them, surely there would be some way to do (and I just don't know) it.
However, the management of custom coordinate refernce systems is very common when you work in specific regions, and you may be encouraged to familiarize with it.
Find out the coordinates of the centroid of your polygon.
Create a custom CRS, centered at the centroid.
Export your feature to the new CRS.
Scale with
v.transform
from there.
If necessary, export it again to its original CRS and merge it to the original layer.
v.transform
algorithm in the Processing Toolbox.