Skip to content
Permalink
Browse files

fixes processing ogr clip tools when input is postgis/spatialite

  • Loading branch information
Giovanni Manghi
Giovanni Manghi committed Feb 5, 2015
1 parent fb344ff commit 5c5cb4066a058fa24f9a25bb6c9d0f7daea653b1
@@ -56,7 +56,7 @@ def defineCharacteristics(self):

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 @@ def processAlgorithm(self, progress):

arguments.append(output)
arguments.append(ogrLayer)

arguments.append(self.ogrLayerName(inLayer))

commands = []
if isWindows():
commands = ['cmd.exe', '/C ', 'ogr2ogr.exe',
@@ -57,7 +57,7 @@ def defineCharacteristics(self):

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 @@ def processAlgorithm(self, progress):
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():

0 comments on commit 5c5cb40

Please sign in to comment.
You can’t perform that action at this time.