<div dir="ltr"><div></div><div>If I try to get the number of axes in C++ from the srs "EPSG:29901+5773", I get different values depending on how I create the wkt.</div><div>I am using the method "<span style="color:rgb(190,192,194)"></span><span style="color:rgb(255,128,128)">OGRSpatialReference</span>::GetAxesCount()<span style="color:rgb(190,192,194)"></span><span style="font-style:italic;color:rgb(69,198,214)">"<br></span></div><div><br></div><div>If I create it with projinfo with the option "--boundcrs-to-wgs84", the number of axis is 0.</div><div><div>and the error message twice<br></div><div>ERROR 1: PROJ: proj_crs_get_coordinate_system: Object is not a SingleCRS</div><div></div></div><br><div><span style="font-family:monospace">projinfo EPSG:29901+5773 -o WKT1:GDAL --boundcrs-to-wgs84 <br>WKT1:GDAL string:<br>COMPD_CS["OSNI 1952 / Irish National Grid + EGM96 height",<br>    PROJCS["OSNI 1952 / Irish National Grid",<br>        GEOGCS["OSNI 1952",<br>            DATUM["OSNI_1952",<br>                SPHEROID["Airy 1830",6377563.396,299.3249646,<br>                    AUTHORITY["EPSG","7001"]],<br>                TOWGS84[482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15],<br>                AUTHORITY["EPSG","6188"]],<br>            PRIMEM["Greenwich",0,<br>                AUTHORITY["EPSG","8901"]],<br>            UNIT["degree",0.0174532925199433,<br>                AUTHORITY["EPSG","9122"]],<br>            AUTHORITY["EPSG","4188"]],<br>        PROJECTION["Transverse_Mercator"],<br>        PARAMETER["latitude_of_origin",53.5],<br>        PARAMETER["central_meridian",-8],<br>        PARAMETER["scale_factor",1],<br>        PARAMETER["false_easting",200000],<br>        PARAMETER["false_northing",250000],<br>        UNIT["metre",1,<br>            AUTHORITY["EPSG","9001"]],<br>        AXIS["Easting",EAST],<br>        AXIS["Northing",NORTH],<br>        AUTHORITY["EPSG","29901"]],<br>    VERT_CS["EGM96 height",<br>        VERT_DATUM["EGM96 geoid",2005,<br>            EXTENSION["PROJ4_GRIDS","us_nga_egm96_15.tif"],<br>            AUTHORITY["EPSG","5171"]],<br>        UNIT["metre",1,<br>            AUTHORITY["EPSG","9001"]],<br>        AXIS["Gravity-related height",UP],<br>        AUTHORITY["EPSG","5773"]]]</span><br></div><div><br></div><div><br></div><div><div><div><br></div></div><div>When I remove the lines EXTENSION or TOWGS84 (that are the only difference) from the WKT string, I get 1, 2 or 3 (depending on the combination of deletion), </div></div><div><br></div><div>Doing more tests, I have the same behaviour with EPSG:25836+5773</div><div><br></div><div>Environment: Ubuntu 18.04. Compiled GDAL 3.2.0 and PROJ 7.2.0</div><div><br></div><div>Is this a know bug? Maybe fixed in PROJ 8.0.0? (I had not time to test it there yet)<br></div><div><br></div><div>I do not like TOWGS84 either, but still many people is using it, and provides WKT including it.<br></div><div><br></div><div>Thanks,</div><div>Javier.<br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__<br>Entre dos pensamientos racionales <br>hay infinitos pensamientos irracionales.<br><br></div></div></div>