MaxRev-Dev / gdal.netcore

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

GetProjectionRef vs GetReproject #123

Closed junewai1993 closed 8 months ago

junewai1993 commented 8 months ago

Hi all, I am a trying to get the CRS from the geotiff, but I noticed that the string returned from GetProjectionRef is slightly different from GetProjection.

I am bit confused with the two functions, and could not find a good documentation on these differences.

MaxRev-Dev commented 8 months ago

I believe it's an overload or an old binding name. The internal function is the same. https://github.com/OSGeo/gdal/blob/171e3361e9745bad15b4fe4719a3c3337d8eec8d/swig/include/Dataset.i#L308

Also from the docs, it should be equivalent https://github.com/OSGeo/gdal/blob/171e3361e9745bad15b4fe4719a3c3337d8eec8d/swig/include/python/docs/gdal_dataset_docs.i#L423 https://gdal.org/doxygen/classGDALDataset.html#ae6765f379a7ecf38b24c1ff5a06573a7