<div dir="ltr"><div>Thanks Even.</div><div><br></div><div>In the mean time (it is not easy to me patching and rebuilding now) I will use this helper workaround function (I hope I understood correctly GetAxis behaviour)<br></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">int getAxesCount(const OGRSpatialReference& sr)<br>{<br>    int axesCount = 0;<br>    while (nullptr != sr.GetAxis(nullptr, axesCount, nullptr))<br>    {<br>        axesCount++;<br>    }<br>    return axesCount;<br>}</span><br></div><br><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">Cheers</span><br></span></div><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><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 26 Apr 2021 at 21:09, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> Is this a know bug?<br>
Now, yes :-)<br>
> Maybe fixed in PROJ 8.0.0? (I had not time to test it there yet)<br>
<br>
No, it is GDAL specific. You'll need to patch <br>
OGRSpatialReference::GetAxesCount() in the ( d->m_pjType == <br>
PJ_TYPE_COMPOUND_CRS ) case, to test if a component of the compound CRS <br>
is a bound CRS, and if so, call proj_crs_get_coordinate_system() on the <br>
source CRS of the bound CRS ( with proj_get_source_crs() ) and not the <br>
bound CRS itself<br>
<br>
Even<br>
<br>
<br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
</blockquote></div>