Skip to content

Commit 9ce1fb4

Browse files
authoredFeb 14, 2017
Merge pull request #4142 from radosuav/fix_gdal_warp
[processing] fix spatial subseting with GDAL warp
2 parents 119e181 + e9cfd0b commit 9ce1fb4

File tree

1 file changed

+3
-3
lines changed
  • python/plugins/processing/algs/gdal

1 file changed

+3
-3
lines changed
 

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ def getConsoleCommands(self):
141141
arguments = []
142142
arguments.append('-ot')
143143
arguments.append(self.TYPE[self.getParameterValue(self.RTYPE)])
144-
if len(srccrs) > 0:
144+
if srccrs:
145145
arguments.append('-s_srs')
146146
arguments.append(srccrs)
147-
if len(dstcrs) > 0:
147+
if dstcrs:
148148
arguments.append('-t_srs')
149149
arguments.append(dstcrs)
150150
if noData and len(noData) > 0:
@@ -177,7 +177,7 @@ def getConsoleCommands(self):
177177
arguments.extend(rastext)
178178

179179
if GdalUtils.version() >= 2000000:
180-
if rastext and rastext_crs is not None:
180+
if rastext and rastext_crs:
181181
arguments.append('-te_srs')
182182
arguments.append(rastext_crs)
183183

0 commit comments

Comments
 (0)
Please sign in to comment.