Quantcast
Channel: Rotate a Geometry Generator expression with a 180 degrees rotation - Geographic Information Systems Stack Exchange
Viewing all articles
Browse latest Browse all 3

Answer by Tom Brennan for Rotate a Geometry Generator expression with a 180 degrees rotation

$
0
0

If you're just to rotate your point within a polygon layer that has a single rectangle, you can use something like the following:

with_variable('centroid',centroid(aggregate('Rectangle','array_agg',@geometry)[0]),with_variable('distance',distance(@geometry,@centroid),with_variable('azimuth',azimuth(@geometry,@centroid),project(@centroid,@distance,@azimuth))))

It relies on the fact that a rotation within a rectangle is just projecting the point from the centroid, the same distance and same angle again.

enter image description here


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>