Skip to content
Permalink
Browse files

[processing] use '-te_crs' parameter only if supported by GDAL

(cherry picked from commit 7f6bae1)
  • Loading branch information
alexbruy committed Jul 28, 2016
1 parent 22a072e commit 872e6d23c0130461f24fdb1d8d8836e8b1e24cfe
Showing with 5 additions and 4 deletions.
  1. +5 −4 python/plugins/processing/algs/gdal/warp.py
@@ -89,7 +89,7 @@ def defineCharacteristics(self):
self.tr('Resampling method'), self.METHOD_OPTIONS))
self.addParameter(ParameterExtent(self.RAST_EXT, self.tr('Raster extent')))

if GdalUtils.version() > 2000000:
if GdalUtils.version() >= 2000000:
self.addParameter(ParameterCrs(self.EXT_CRS,
self.tr('CRS of the raster extent'), ''))

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

if rastext and rastext_crs is not None:
arguments.append('-te_srs')
arguments.append(rastext_crs)
if GdalUtils.version() >= 2000000:
if rastext and rastext_crs is not None:
arguments.append('-te_srs')
arguments.append(rastext_crs)

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

0 comments on commit 872e6d2

Please sign in to comment.
You can’t perform that action at this time.