New answers tagged linestring
Take a look at ST_FlipCoordinates (PostGIs 2.0 and up). That function was created to help people in your situation.
ST_GeometryType returns 'ST_Linestring', 'ST_Polygon','ST_MultiPolygon' etc. You can change check to use GeometryType which return mentioned values without ST_ prefix
Top 50 recent answers are included