Commit 99bdad95 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed bad handling of local projections in GeoArray.set_gdalDataset_meta().

parent 053ea9de
Pipeline #1471 failed with stages
in 1 minute
......@@ -29,7 +29,7 @@ from py_tools_ds.convenience.object_oriented import alias_property
from py_tools_ds.geo.coord_calc import get_corner_coordinates
from py_tools_ds.geo.coord_grid import snap_bounds_to_pixGrid
from py_tools_ds.geo.coord_trafo import mapXY2imXY, imXY2mapXY, transform_any_prj, reproject_shapelyGeometry
from py_tools_ds.geo.projection import prj_equal, WKT2EPSG, EPSG2WKT
from py_tools_ds.geo.projection import prj_equal, WKT2EPSG, EPSG2WKT, isLocal
from py_tools_ds.geo.raster.conversion import raster2polygon
from py_tools_ds.geo.vector.topology \
import get_footprint_polygon, polyVertices_outside_poly, fill_holes_within_poly
......@@ -694,10 +694,8 @@ class GeoArray(object):
# temp conversion to EPSG needed because GDAL seems to modify WKT string when writing file to disk
# (e.g. using gdal_merge) -> conversion to EPSG and back undos that
self._projection = EPSG2WKT(WKT2EPSG(ds.GetProjection()))
self._projection = None
wkt = ds.GetProjection()
self._projection = EPSG2WKT(WKT2EPSG(wkt)) if not isLocal(wkt) else ''
if 'nodata' not in self._initParams or self._initParams['nodata'] is None:
band = ds.GetRasterBand(1)
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