[gdal-dev] GetAxesCount returns a wrong value

Even Rouault even.rouault at spatialys.com
Mon Apr 26 12:09:29 PDT 2021


> Is this a know bug?
Now, yes :-)
> Maybe fixed in PROJ 8.0.0? (I had not time to test it there yet)

No, it is GDAL specific. You'll need to patch 
OGRSpatialReference::GetAxesCount() in the ( d->m_pjType == 
PJ_TYPE_COMPOUND_CRS ) case, to test if a component of the compound CRS 
is a bound CRS, and if so, call proj_crs_get_coordinate_system() on the 
source CRS of the bound CRS ( with proj_get_source_crs() ) and not the 
bound CRS itself

Even


-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list