Merge pull request #1887 from gioman/fix_processing_ogr_clip

fixes processing ogr clip tools when input is postgis/spatialite
This commit is contained in:
volaya 2015-02-06 08:18:25 +01:00
commit 6f338d75aa
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,6 +74,7 @@ class Ogr2OgrClip(OgrAlgorithm):
arguments.append(output)
arguments.append(ogrLayer)
arguments.append(self.ogrLayerName(inLayer))
commands = []
if isWindows():

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():