fixes processing ogr clip tools when input is postgis/spatialite

This commit is contained in:
Giovanni Manghi 2015-02-05 18:37:59 +00:00
parent fb344ff1b6
commit 5c5cb4066a
2 changed files with 6 additions and 5 deletions

View File

@ -56,7 +56,7 @@ class Ogr2OgrClip(OgrAlgorithm):
def processAlgorithm(self, progress):
inLayer = self.getParameterValue(self.INPUT_LAYER)
ogrLayer = self.ogrConnectionString(inLayer)
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
clipLayer = self.getParameterValue(self.CLIP_LAYER)
ogrClipLayer = self.ogrConnectionString(clipLayer)
@ -74,7 +74,8 @@ class Ogr2OgrClip(OgrAlgorithm):
arguments.append(output)
arguments.append(ogrLayer)
arguments.append(self.ogrLayerName(inLayer))
commands = []
if isWindows():
commands = ['cmd.exe', '/C ', 'ogr2ogr.exe',

View File

@ -57,7 +57,7 @@ class Ogr2OgrClipExtent(OgrAlgorithm):
def processAlgorithm(self, progress):
inLayer = self.getParameterValue(self.INPUT_LAYER)
ogrLayer = self.ogrConnectionString(inLayer)
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
clipExtent = self.getParameterValue(self.CLIP_EXTENT)
ogrclipExtent = self.ogrConnectionString(clipExtent)
@ -74,14 +74,14 @@ class Ogr2OgrClipExtent(OgrAlgorithm):
arguments.append(regionCoords[2])
arguments.append(regionCoords[1])
arguments.append(regionCoords[3])
#arguments.append('-spat')
#arguments.append(ogrclipExtent)
arguments.append('-clipsrc spat_extent')
if len(options) > 0:
arguments.append(options)
arguments.append(output)
arguments.append(ogrLayer)
arguments.append(self.ogrLayerName(inLayer))
commands = []
if isWindows():