[gdal-dev] GDAL 3.0.0 / Proj 6.1.0 Shapefile import coordinates X/Y transposed?

Sean Gillies sean at mapbox.com
Fri May 24 14:00:40 PDT 2019


Even,

To be clear, would replacing

    sr->importFromEPSG(4326);

with

    sr->SetFromUserInput("urn:ogc:def:crs:OGC:1.3:CRS84");

also restore the old behavior? CRS84 is the formally correct identifier for
what we've been calling EPSG:4326, right?


On Fri, May 24, 2019 at 2:50 PM Even Rouault <even.rouault at spatialys.com>
wrote:

> On vendredi 24 mai 2019 13:35:40 CEST Simon Eves wrote:
> > I feel like I'm asking a really dumb and naive question again, but here
> > goes...
> >
> > Our geo importer loads polygons in what I assume is a very standard way.
> > The importer code has not changed in some time, and works fine built
> > against GDAL 2.3.2 and Proj 5.1, and also against GDAL 2.4.1 and Proj
> 5.2.
> >
> > When I build our system against GDAL 3.0.0 and Proj 6.1.0, everything
> seems
> > to work fine, and GeoJSON and KML files import correctly, but Shapefiles
> > result in all the geo being transposed in X/Y!
> >
> > Simplified code...
> >
> > sr = new OGRSpatialReference();
> > sr->importFromEPSG(4326);
>
> EPSG:4326 has lat,long order enforced by default in GDAL 3.0
> So either cope with it with the x,y you get.
> Or add sr->SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);
>
>
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev



-- 
Sean Gillies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190524/d439cd89/attachment.html>


More information about the gdal-dev mailing list