[postgis-users] ST_Transform troubles

Frans Knibbe frans.knibbe at geodan.nl
Fri Jun 24 02:57:16 PDT 2011


On 2011-06-23 23:18, Mike Toews wrote:
> Hi Frans,
>
> On 24 June 2011 02:56, Frans Knibbe<frans.knibbe at geodan.nl>  wrote:
>> About the order of coordinates: I see that PostGIS uses EPSG as the
>> authority that defines coordinate reference systems. If you look up the
>> definition of EPSG:4326 (for example at http://www.epsg-registry.org/, use
>> 'retrieve by code'), you can see that it explicitly says that the axes are
>> latitude, longitude. So it seems the standard that is used in PostGIS
>> specifies (latitude, longitude), not (longitude, latitude).
> Right, of course there are several "Standards" around. Ralf mentioned
> the surveyor's convention, which I recall seeing "NEZ" (northing,
> easting, elevation). In printed form, the order is almost always
> "latitude, longitude", and I'm sure that convention is centuries
> (millennia?) old. There is an ISO convention that specifies "latitude,
> longitude" see http://en.wikipedia.org/wiki/ISO_6709
Interesting, I did not know about this. But PostGIS does not state is 
uses the ISO-6709 standard. It does state that it uses the EPSG standard.
> The Open Geospatial Consortium (formerly Open GIS) are the standards
> organization for open source software, and PostGIS was certified
> several years ago.
They probably did not check conformance with the EPSG specifications. 
Rightly so, because it is another standard.
>   Throughout all of their documentation for
> coordinate order they use the Cartesian coordinate system for sake of
> consistency. So a point must be defined in the order "X Y", regardless
> of coordinate reference system.
Right. But in some cases the X axis is west-east and it some cases it 
runs south-north.
>   They actually do spell out "The
> longitude is assumed to be the first ordinate, and the latitude is
> assumed to be the second ordinate" in a rather old "OpenGIS
> Implementation Specification: Coordinate Transformation Services"
> document.
I looked it up. It is there, but it is not a general assumption. The 
text is in a paragraph which only deals with Lontitude_Rotation, which 
is one of many parameterized transforms. I think this statement can not 
be read outside of its context.

Perhaps a firm statement on this issue can be found somewhere in an OGC 
document. But my impression is that the OGC is silent on the issue of 
axis orientation, leaving it to the standards body that defines 
coordinate reference systems (such as the EPSG).

As I see it, the plain facts are as follows:
1) PostGIS states that it uses the EPSG specifications for the 
definition of coordinate reference systems.
2) PostGIS assumes that the first ordinate always is on an east-west 
axis, and the second ordinate is on a south-north axis.

Or in a smaller nutshell: PostGIS says it complies with a standard but 
does not comply to that standard.


> As for EPSG, they don't necessarily do anything with geospatial
> formats and serialized output, but their documents are consistently in
> the order "latitude, longitude", as you correctly pointed out.
>
> -Mike
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users





More information about the postgis-users mailing list