Skip to content
Permalink
Browse files

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

  • Loading branch information
alexbruy committed Jul 28, 2016
1 parent 572a60b commit 7f6bae1f5e149ed9170835310676d1340de26cd4
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 7f6bae1

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