Commit 12ac4061 authored by Daniel Scheffler's avatar Daniel Scheffler

geotransform2mapinfo() should now be compatible with gdal<3.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent f8729dfb
Pipeline #11908 passed with stage
in 12 minutes and 20 seconds
......@@ -253,6 +253,9 @@ def geotransform2mapinfo(gt, prj):
fdir = os.path.join(os.path.abspath(os.curdir))
try:
if int(gdal.__version__[0]) < 3:
prj = CRS(prj).to_wkt(version="WKT1_GDAL") # noqa
ds_out = gdal.GetDriverByName('ENVI').Create(fn_bsq, 2, 2, 1, gdal.GDT_Int32)
ds_out.SetGeoTransform(gt)
ds_out.SetProjection(prj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment