How to rotate geometries in PostGIS
blog.indoorway.com