Skip to content

Commit 872e6d2

Browse files
committedJul 28, 2016
[processing] use '-te_crs' parameter only if supported by GDAL
(cherry picked from commit 7f6bae1)
1 parent 22a072e commit 872e6d2

File tree

1 file changed

+5
-4
lines changed
  • python/plugins/processing/algs/gdal

1 file changed

+5
-4
lines changed
 

‎python/plugins/processing/algs/gdal/warp.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def defineCharacteristics(self):
8989
self.tr('Resampling method'), self.METHOD_OPTIONS))
9090
self.addParameter(ParameterExtent(self.RAST_EXT, self.tr('Raster extent')))
9191

92-
if GdalUtils.version() > 2000000:
92+
if GdalUtils.version() >= 2000000:
9393
self.addParameter(ParameterCrs(self.EXT_CRS,
9494
self.tr('CRS of the raster extent'), ''))
9595

@@ -176,9 +176,10 @@ def getConsoleCommands(self):
176176
if rastext:
177177
arguments.extend(rastext)
178178

179-
if rastext and rastext_crs is not None:
180-
arguments.append('-te_srs')
181-
arguments.append(rastext_crs)
179+
if GdalUtils.version() >= 2000000:
180+
if rastext and rastext_crs is not None:
181+
arguments.append('-te_srs')
182+
arguments.append(rastext_crs)
182183

183184
if extra and len(extra) > 0:
184185
arguments.append(extra)

0 commit comments

Comments
 (0)
Please sign in to comment.