[postgis-users] How to Rotate a polygon.

Maciej Skorczewski maciej.skorczewski at procad.pl
Mon Feb 26 03:50:06 PST 2007


thx guys it works fine!
this is my sql code:


Rotate a polygon - who stay in this same center point.


update table_name set wkb_geometry=(
					SELECT
					translate(
					rotate(
					translate(wkb_geometry,-x(centroid(wkb_geometry)),
					-y(centroid(wkb_geometry))),
					radians('2')),
					x(centroid(wkb_geometry)),
					y(centroid(wkb_geometry))
					)) where ogc_fid='id_object_to_rotate';



maciek



More information about the postgis-users mailing list