How can I generate a line with given center point, angle and length in QGIS?
I am analyzing that auto extraction lineament for geologic structure analyze.
How can I generate a line with given center point, angle and length in QGIS?
I am analyzing that auto extraction lineament for geologic structure analyze.
Creating a line without PyQGIS, using only QGIS expressions: Use either Geometry generator (for visualization only) or create actual geomtries with Geometry by expression - use this one to create actual geometries (real lines): see here for details).
If the point should be in the middle of the line, simply extend the line. Use this expression for a line with length of 20 and angle (azimuth: angle clockwise from north) of 112° degrees:
extend (
make_line(
$geometry,
project(
$geometry,
20,
radians(112)
)
),
20,
0
)
y=mx+cshould be all you need – Ian Turton Nov 08 '21 at 08:47