<div dir="ltr">Hi,<div><br></div><div>To reverse geometry coordinates, use ST_FlipCoordinates or ST_SwapOrdinates</div><div><br></div><div>Nicolas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 November 2015 at 18:08, Paul Ramsey <span dir="ltr"><<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We Leave It To You, in that the ordering in the WKT will be reflective<br>
of the ordering you've stored your data in.<br>
However.<br>
If you want to reproject or do any other Nice Things with your data,<br>
store it in X/Y order. Otherwise you'll need a special spatial_ref_sys<br>
entry for your data that indicates the axis ordering you've chosen,<br>
using the +axis proj4 argument.<br>
<a href="http://gis.stackexchange.com/questions/6221/how-can-i-specify-a-proj-4-projection-with-the-north-pointing-down" rel="noreferrer" target="_blank">http://gis.stackexchange.com/questions/6221/how-can-i-specify-a-proj-4-projection-with-the-north-pointing-down</a><br>
By default we assume data in SRID 4326 (and other spherical systems)<br>
are X/Y ordered.<br>
<span class="HOEnZb"><font color="#888888">P<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Tue, Nov 17, 2015 at 7:09 AM, Willy-Bas Loos <<a href="mailto:willybas@gmail.com">willybas@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I have a couple of questions about the order of lattitude and longitude in<br>
> WKT representations of geometries:<br>
><br>
> Is there an objective reference that states in what order WGS84 (geographic)<br>
> coordinates should be represented in a WKT? Is it lon, lat (because of x,y)<br>
> or lat,lon (because it's geodetic) ?<br>
> Does postgis use the correct representation?<br>
> Is there a way to switch lat and lon for a polygon when representing as WKT?<br>
> All i think of is looping through all points, switching x and y and then<br>
> returning astext(g)<br>
><br>
> Cheers,<br>
><br>
> --<br>
> Willy-Bas Loos<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/postgis-users</a></div></div></blockquote></div><br></div>