mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Merge pull request #1904 from gioman/fix_ogr2ogr_clip
[processing] ogr clip by polygon: clip polygon layer name must be declared to avoid issues with postgis and spatialite layers
This commit is contained in:
commit
1b0fb48012
@ -58,7 +58,7 @@ class Ogr2OgrClip(OgrAlgorithm):
|
|||||||
inLayer = self.getParameterValue(self.INPUT_LAYER)
|
inLayer = self.getParameterValue(self.INPUT_LAYER)
|
||||||
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
|
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)[1:-1]
|
||||||
|
|
||||||
output = self.getOutputFromName(self.OUTPUT_LAYER)
|
output = self.getOutputFromName(self.OUTPUT_LAYER)
|
||||||
outFile = output.value
|
outFile = output.value
|
||||||
@ -69,6 +69,8 @@ class Ogr2OgrClip(OgrAlgorithm):
|
|||||||
arguments = []
|
arguments = []
|
||||||
arguments.append('-clipsrc')
|
arguments.append('-clipsrc')
|
||||||
arguments.append(ogrClipLayer)
|
arguments.append(ogrClipLayer)
|
||||||
|
arguments.append("-clipsrclayer")
|
||||||
|
arguments.append(self.ogrLayerName(clipLayer))
|
||||||
if len(options) > 0:
|
if len(options) > 0:
|
||||||
arguments.append(options)
|
arguments.append(options)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user