MaxRev-Dev / gdal.netcore

GDAL 3.x C#/F# bindings for .NET apps
MIT License
162 stars 36 forks source link

Cannot find grib2_subcenter.csv after upgrade to 3.8.3 #128

Closed Mikiewitch closed 7 months ago

Mikiewitch commented 7 months ago

Describe the bug The grib2_subcenter.csv is missing again after update to 3.8.3. This bug previously appeared after update to 3.6.1. We added the files manually last time as a workaround.

To Reproduce Update to gdal version 3.8.3.

Expected behavior Files should be present in the output. ` Environment information:

MaxRev-Dev commented 7 months ago

So, it's not missing in latest packages. It should be copied to gdal-data from the main package. See the package source: https://nuget.info/packages/MaxRev.Gdal.Core/3.8.3.286

But.

I see now, there's an issue with path to which GDAL_DATA option is being initialized during startup. I believe this should do the trick in the "most cases". I'll create a patch and mention specifics in the docs.

Gdal.SetConfigOption("GDAL_DATA", Path.Combine(AppContext.BaseDirectory, "runtimes/any/native/gdal-data" ));
Mikiewitch commented 7 months ago

Thank you very much for a quick response. It helped.