[gdal-dev] Bug reading a byn file for Canadian geoid model?

Even Rouault even.rouault at spatialys.com
Wed Jul 15 11:00:42 PDT 2026


Javier,

I'd assume that code that assigns datums to have only been valid for the 
particular grids it was developped for. You'd better ignore any CRS 
information reported by the driver and override them from the 
documentation of the grid you're interested in

Even

Le 09/07/2026 à 17:20, Javier Jimenez Shaw via gdal-dev a écrit :
> Hi
>
> I am trying to read this file, in theory based in ITRF
> https://webapp.csrs-scrs.nrcan-rncan.gc.ca/geod/process/download-helper.php?file_id=GSD95
> (there is another one based in NAD83xxx)
>
> However in with gdalinfo I see this:
> "Warning 1: CRS EPSG:4140 is deprecated. Its non-deprecated 
> replacement EPSG:4617 will be used instead. To use the original CRS, 
> set the OSR_USE_NON_DEPRECATED configuration option to NO."
>
> EPSG:4140 https://spatialreference.org/ref/epsg/4140/ 
> is NAD83(CSRS98), that is not ITRF, as far as I know.
>
> However in byndataset.h there is this line:
>
> constexpr int BYN_DATUM_0 = 4140;  /* ITRF2008 (GRS80 based WGS84) */
>
> https://github.com/OSGeo/gdal/blob/master/frmts/raw/byndataset.h#L168
>
> Are we parsing the header wrongly?
>
> There is some documentation in 
> https://webapp.csrs-scrs.nrcan-rncan.gc.ca/geod/tools-outils/sample_doc_files/NRCan_Geoid_GridFormat_EN_2023.pdf
> I think what I say above applies to the field 16, Datum.
>
> Thanks
> Javier
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
LLMs contribute to global warming and brain rot.



More information about the gdal-dev mailing list