Commit 9c53d0fa authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Bugfix for wrong output geotransform within GeoArray._get_plotable_image()

geo.raster.reproject
- bugfix for returning wrong geotransform (bug from previous commit)
parent 30968972
......@@ -370,7 +370,8 @@ def warp_ndarray(ndarray, in_gt, in_prj, out_prj=None, out_dtype=None, out_gsd=(
#if gcpList:
# in_ds.SetGCPs(gcpList, in_ds.GetProjection())
if True:
if gcpList:
gdal_Translate = get_gdal_func('Translate')
in_ds = gdal_Translate(
'', in_ds, format='MEM',
......
......@@ -505,7 +505,7 @@ class GeoArray(object):
def _get_plottable_image(self, xlim=None, ylim=None, band=0, res_factor=None, nodataVal=None, out_prj=None):
# handle limits
cS, cE = xlim if isinstance(xlim, (tuple, list)) else (0, self.columns - 1)
rS, rE = ylim if isinstance(ylim, (tuple, list)) else (0, self.rows - 1)
rS, rE = ylim if isinstance(ylim, (tuple, list)) else (0, self.rows - 1)
image2plot = self[rS:rE, cS:cE, band]
gt, prj = self.geotransform, self.projection
......
Supports Markdown
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