CoastSat icon indicating copy to clipboard operation
CoastSat copied to clipboard

Potential issue with SDS.tools.convert_epsg with latest GDAL version

Open VHeimhuber opened this issue 3 years ago • 1 comments

Hi all,

I seem to be running into issues with the SDS.tools.convert_epsg function that only occurs in an environment that I recently set up with the updated instructions in the readme. I believe it has to do with updates that occurred from GDAL 2 to 3. The code works perfectly fine in my old environment that runs on GDAL 2. something.

Basically, the function returns empty coordinates. I'm wondering if anyone else is using GDAL 3 and has encountered a similar issue.

I'm thinking it may occur at this step: inSpatialRef.ImportFromEPSG, since GDAL made some changes there as stated on their pages:

"This method try to attach a 3-parameter or 7-parameter Helmert transformation to WGS84 when there is one and only one such method available for the CRS. This behavior might not always be desirable, so starting with GDAL 3.0.3, the OSR_ADD_TOWGS84_ON_IMPORT_FROM_EPSG configuration option can be set to NO to disable this behavior."

Thanks, T.

VHeimhuber avatar Jul 04 '22 07:07 VHeimhuber

hey Tino, I understand that they have been major changes between GDAL 2 and GDAL 3 (even the way point coordinates are given!). It's hard for conda to solve the conflicts since GDAL is a C++ library that comes as a set of executables (gdalinfo, gdal_config etc) and python wraps around those executables and to run commands. Can you revert to an older version of GDAL that worked?

kvos avatar Jul 13 '22 09:07 kvos

the new installation procedure should solve this issue

kvos avatar Aug 24 '22 12:08 kvos