fix some ogr tools in master

This commit is contained in:
Giovanni Manghi 2017-02-08 11:22:21 +00:00
parent 2f68d1a7c3
commit 566c058db8
5 changed files with 7 additions and 5 deletions

View File

@ -134,7 +134,8 @@ class Ogr2Ogr(GdalAlgorithm):
arguments = []
arguments.append('-f')
arguments.append(outFormat)
if len(options) > 0:
if options is not None and len(options.strip()) > 0:
arguments.append(options)
arguments.append(output)

View File

@ -75,7 +75,8 @@ class Ogr2OgrClip(GdalAlgorithm):
arguments.append(ogrClipLayer)
arguments.append("-clipsrclayer")
arguments.append(ogrLayerName(clipLayer))
if len(options) > 0:
if options is not None and len(options.strip()) > 0:
arguments.append(options)
arguments.append(output)

View File

@ -78,7 +78,7 @@ class Ogr2OgrClipExtent(GdalAlgorithm):
arguments.append(regionCoords[3])
arguments.append('-clipsrc spat_extent')
if len(options) > 0:
if options is not None and len(options.strip()) > 0:
arguments.append(options)
arguments.append(output)

View File

@ -134,7 +134,7 @@ class Ogr2OgrDissolve(GdalAlgorithm):
if not multi:
arguments.append('-explodecollections')
if options is not None and len(options) > 0:
if options is not None and len(options.strip()) > 0:
arguments.append(options)
commands = []

View File

@ -90,7 +90,7 @@ class Ogr2OgrPointsOnLines(GdalAlgorithm):
arguments.append(layername)
arguments.append('"')
if len(options) > 0:
if options is not None and len(options.strip()) > 0:
arguments.append(options)
commands = []