[Qgis-user] Geometry generator - reduce line

Dario C dario955i at gmail.com
Thu Jun 17 06:52:42 PDT 2021


Hi,
I'm trying to do an arc starting from a simple line.

I'm using geometry generator with this code:
make_line( start_point( $geometry), translate( centroid( $geometry),
$length/10, $length/10), end_point($geometry))

and it is working well.

I'd like to have shorter line, so I started considering extend function
with negative paramtere, but it does not work:
extend(make_line( start_point( $geometry), translate( centroid( $geometry),
$length/10, $length/10), end_point($geometry)),-100,-100)
(with positive parameter extension works)

I have serached in the geometry category but I didn't find anything similar
to "reduce".


Other question, related to the same geometry. I want to have the label
curved and at the center of the arc and not of the line.
I tried with the expression:
translate( centroid( $geometry), $length/10, $length/10)
in the "label anchor", but nothing happen :(


  Any suggestion? Thank you!


Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210617/52255c5c/attachment.html>


More information about the Qgis-user mailing list