I have 30 points, each one represents the SE corner of a 1.5 by 1.5m plot. I want to create polygons to represent these plots.
How do I create square polygons from a corner point and with a specific length?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI have 30 points, each one represents the SE corner of a 1.5 by 1.5m plot. I want to create polygons to represent these plots.
How do I create square polygons from a corner point and with a specific length?
There is "Vector geometry > Geometry by Expression" tool in Processing Toolbox. You should use in a projected coordinate system.
Select "Polygon" as "Output geometry type" option.
Click "Expression" button (highlighted blue square)
And paste the following expression
make_rectangle_3points(
make_point($x, $y),
make_point($x, $y + 1.5),
make_point($x - 1.5, $y + 1.5)
)
Result:
Use geometry by expression to create a point at 315 degrees azimuth from your point with a distance of the hypotenuse of the square, then create a box around the two points:
bounds(collect_geometries( $geometry, project( $geometry, sqrt(2*1.5^2), radians(315))))