[postgis-users] shp2pgsql - reversing x,y coordinates?

P Kishor punkish at eidesis.org
Tue Aug 1 20:48:12 PDT 2006


indeed, lon = x, the horizontal displacement from the origin; and lat
= y, the vertical displacement from the origin.

On 8/1/06, Michael Fuhr <mike at fuhr.org> wrote:
> On Tue, Aug 01, 2006 at 04:39:17PM -0400, Peter Fay wrote:
> > You are getting the same results as me.  The first point is
> >  180 68.993782043457
> > I assumed x = latitude, y = longitude, but the reverse is true: x =
> > longitude, y = latitude (since 180 cannot be a latitude).
> >
> > I guess all shapefiles are organized (longitude, latitude).  I guess this is
> > the way it's supposed to be?
>
> According to the shapefile technical description[1], "A point
> consists of a pair of double-precision coordinates in the order
> X, Y."  The description doesn't mention longitude or latitude, but
> in longlat projections longitude is conventionally the horizontal
> (X) axis.  It might be formally defined as such somewhere but I
> don't have a reference handy.
>
> [1] http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf
>
> --
> Michael Fuhr
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.ies.wisc.edu/
Open Source Geospatial Foundation https://edu.osgeo.org/



More information about the postgis-users mailing list