<div dir="auto">I started a branch to fix it. Looks like there enough info in the byn header.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, 15 Jul 2026, 20:00 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">Javier,<br>
<br>
I'd assume that code that assigns datums to have only been valid for the <br>
particular grids it was developped for. You'd better ignore any CRS <br>
information reported by the driver and override them from the <br>
documentation of the grid you're interested in<br>
<br>
Even<br>
<br>
Le 09/07/2026 à 17:20, Javier Jimenez Shaw via gdal-dev a écrit :<br>
> Hi<br>
><br>
> I am trying to read this file, in theory based in ITRF<br>
> <a href="https://webapp.csrs-scrs.nrcan-rncan.gc.ca/geod/process/download-helper.php?file_id=GSD95" rel="noreferrer noreferrer" target="_blank">https://webapp.csrs-scrs.nrcan-rncan.gc.ca/geod/process/download-helper.php?file_id=GSD95</a><br>
> (there is another one based in NAD83xxx)<br>
><br>
> However in with gdalinfo I see this:<br>
> "Warning 1: CRS EPSG:4140 is deprecated. Its non-deprecated <br>
> replacement EPSG:4617 will be used instead. To use the original CRS, <br>
> set the OSR_USE_NON_DEPRECATED configuration option to NO."<br>
><br>
> EPSG:4140 <a href="https://spatialreference.org/ref/epsg/4140/" rel="noreferrer noreferrer" target="_blank">https://spatialreference.org/ref/epsg/4140/</a> <br>
> is NAD83(CSRS98), that is not ITRF, as far as I know.<br>
><br>
> However in byndataset.h there is this line:<br>
><br>
> constexpr int BYN_DATUM_0 = 4140;  /* ITRF2008 (GRS80 based WGS84) */<br>
><br>
> <a href="https://github.com/OSGeo/gdal/blob/master/frmts/raw/byndataset.h#L168" rel="noreferrer noreferrer" target="_blank">https://github.com/OSGeo/gdal/blob/master/frmts/raw/byndataset.h#L168</a><br>
><br>
> Are we parsing the header wrongly?<br>
><br>
> There is some documentation in <br>
> <a href="https://webapp.csrs-scrs.nrcan-rncan.gc.ca/geod/tools-outils/sample_doc_files/NRCan_Geoid_GridFormat_EN_2023.pdf" rel="noreferrer noreferrer" target="_blank">https://webapp.csrs-scrs.nrcan-rncan.gc.ca/geod/tools-outils/sample_doc_files/NRCan_Geoid_GridFormat_EN_2023.pdf</a><br>
> I think what I say above applies to the field 16, Datum.<br>
><br>
> Thanks<br>
> Javier<br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
-- <br>
<a href="http://www.spatialys.com" rel="noreferrer noreferrer" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
LLMs contribute to global warming and brain rot.<br>
<br>
</blockquote></div>