I have a single polygon shapefile (EPSG: 3044) which I want to enlarge using QGIS 2.18.16. I tried to use the vector affine transformation plugin, but whenever I try to change the size of the polygon, the whole layer changes its position and shape. Is there a tool in QGIS where I can do this task or is it possible with the affine transformation plugin and I just cannot find the right values?
What I have: Some csv points and a country-border. The points do not have the correct positional accuracy. Therefore I want to enlarge the country-border so that all points fit into the poylgon.
What I get when I change the X and Y scale from 1,0 to 2,0:
Answer
Both GRASS (as Erik Lohmann points out) and SAGA have tools that can accomplish this. I've accomplished this in the past using the tool SAGA > Vector General > Transform vector layer.
- In order to prevent your shape from "drifting", you'll need to derive the centroid first. Run Centroid, using input
polygon_layer
. Here's an example, with the centroid labelled using the expressionx($geometry)||' '||y($geometry)
.
Run Transform vector layer:
- Shapes =
polygon_layer
Scale Factor X/Y
= the coefficient you want to enlarge by. In this example, I've specified a scale factor of 2 for both, meaning my output will be double the size of the input.- For parameters X and Y, input the centroid coordinates. These values serve as the anchor points from which your input will be scaled.
- Shapes =
Output from the above shape, with the new shape's centroid visible:
No comments:
Post a Comment