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 <tylerkvei...@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
>
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to