[Qgis-user] Geometry Generator

Tyler Veinot tylerkveinot at gmail.com
Fri Jan 27 10:52:17 PST 2017


This makes the rectangle;
geom_from_wkt(
'POLYGON(('||
(x( centroid( $geometry) ) + (("length" /1000)/2))||' '||(y( centroid(
$geometry) ) + (("width"/1000)/2))||','||
(x( centroid( $geometry) ) + (("length" /1000)/2))||' '||(y( centroid(
$geometry) ) - (("width"/1000)/2))||','||
(x( centroid( $geometry) ) - (("length" /1000)/2))||' '||(y( centroid(
$geometry) ) - (("width"/1000)/2))||','||
(x( centroid( $geometry) ) - (("length" /1000)/2))||' '||(y( centroid(
$geometry) ) + (("width"/1000)/2))||','||
(x( centroid( $geometry) ) + (("length" /1000)/2))||' '||(y( centroid(
$geometry) ) + (("width"/1000)/2))||
'))')
What can I add to rotate it based on the rotation field?

On Fri, Jan 27, 2017 at 2:06 PM, Tyler Veinot <tylerkveinot at gmail.com>
wrote:

> I have been experimenting with the geometry generator in the symbology
> engine and I got it to style line features as a buffer based on a width
> field. What I am trying to take a point with a length width and rotation
> field and draw a box with the specified length width and rotation of the
> point, I am not sure where to start with the code for that, does anyone
> have an example I can use to help me figure it out?
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170127/163d690e/attachment.html>


More information about the Qgis-user mailing list