mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
fixes processing ogr clip tools when input is postgis/spatialite
This commit is contained in:
parent
fb344ff1b6
commit
5c5cb4066a
@ -56,7 +56,7 @@ class Ogr2OgrClip(OgrAlgorithm):
|
|||||||
|
|
||||||
def processAlgorithm(self, progress):
|
def processAlgorithm(self, progress):
|
||||||
inLayer = self.getParameterValue(self.INPUT_LAYER)
|
inLayer = self.getParameterValue(self.INPUT_LAYER)
|
||||||
ogrLayer = self.ogrConnectionString(inLayer)
|
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
|
||||||
clipLayer = self.getParameterValue(self.CLIP_LAYER)
|
clipLayer = self.getParameterValue(self.CLIP_LAYER)
|
||||||
ogrClipLayer = self.ogrConnectionString(clipLayer)
|
ogrClipLayer = self.ogrConnectionString(clipLayer)
|
||||||
|
|
||||||
@ -74,7 +74,8 @@ class Ogr2OgrClip(OgrAlgorithm):
|
|||||||
|
|
||||||
arguments.append(output)
|
arguments.append(output)
|
||||||
arguments.append(ogrLayer)
|
arguments.append(ogrLayer)
|
||||||
|
arguments.append(self.ogrLayerName(inLayer))
|
||||||
|
|
||||||
commands = []
|
commands = []
|
||||||
if isWindows():
|
if isWindows():
|
||||||
commands = ['cmd.exe', '/C ', 'ogr2ogr.exe',
|
commands = ['cmd.exe', '/C ', 'ogr2ogr.exe',
|
||||||
|
@ -57,7 +57,7 @@ class Ogr2OgrClipExtent(OgrAlgorithm):
|
|||||||
|
|
||||||
def processAlgorithm(self, progress):
|
def processAlgorithm(self, progress):
|
||||||
inLayer = self.getParameterValue(self.INPUT_LAYER)
|
inLayer = self.getParameterValue(self.INPUT_LAYER)
|
||||||
ogrLayer = self.ogrConnectionString(inLayer)
|
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
|
||||||
clipExtent = self.getParameterValue(self.CLIP_EXTENT)
|
clipExtent = self.getParameterValue(self.CLIP_EXTENT)
|
||||||
ogrclipExtent = self.ogrConnectionString(clipExtent)
|
ogrclipExtent = self.ogrConnectionString(clipExtent)
|
||||||
|
|
||||||
@ -74,14 +74,14 @@ class Ogr2OgrClipExtent(OgrAlgorithm):
|
|||||||
arguments.append(regionCoords[2])
|
arguments.append(regionCoords[2])
|
||||||
arguments.append(regionCoords[1])
|
arguments.append(regionCoords[1])
|
||||||
arguments.append(regionCoords[3])
|
arguments.append(regionCoords[3])
|
||||||
#arguments.append('-spat')
|
arguments.append('-clipsrc spat_extent')
|
||||||
#arguments.append(ogrclipExtent)
|
|
||||||
|
|
||||||
if len(options) > 0:
|
if len(options) > 0:
|
||||||
arguments.append(options)
|
arguments.append(options)
|
||||||
|
|
||||||
arguments.append(output)
|
arguments.append(output)
|
||||||
arguments.append(ogrLayer)
|
arguments.append(ogrLayer)
|
||||||
|
arguments.append(self.ogrLayerName(inLayer))
|
||||||
|
|
||||||
commands = []
|
commands = []
|
||||||
if isWindows():
|
if isWindows():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user