Skip to content

Commit

Permalink
[processing] use '-te_crs' parameter only if supported by GDAL
Browse files Browse the repository at this point in the history
(cherry picked from commit 7f6bae1)
  • Loading branch information
alexbruy committed Jul 28, 2016
1 parent 22a072e commit 872e6d2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/plugins/processing/algs/gdal/warp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'), ''))

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 872e6d2

Please sign in to comment.