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

Even Rouault even.rouault at spatialys.com
Fri May 24 13:49:54 PDT 2019


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


More information about the gdal-dev mailing list