Skip to content

Commit e62a7fa

Browse files
author
Giovanni Manghi
committed
ogr clip by polygon: clip polygon layer name must be declared to avoid issues with postgis and spatialite layers
1 parent db17513 commit e62a7fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/plugins/processing/algs/gdal/ogr2ogrclip.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def processAlgorithm(self, progress):
5858
inLayer = self.getParameterValue(self.INPUT_LAYER)
5959
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
6060
clipLayer = self.getParameterValue(self.CLIP_LAYER)
61-
ogrClipLayer = self.ogrConnectionString(clipLayer)
61+
ogrClipLayer = self.ogrConnectionString(clipLayer)[1:-1]
6262

6363
output = self.getOutputFromName(self.OUTPUT_LAYER)
6464
outFile = output.value
@@ -69,6 +69,8 @@ def processAlgorithm(self, progress):
6969
arguments = []
7070
arguments.append('-clipsrc')
7171
arguments.append(ogrClipLayer)
72+
arguments.append("-clipsrclayer")
73+
arguments.append(self.ogrLayerName(clipLayer))
7274
if len(options) > 0:
7375
arguments.append(options)
7476

0 commit comments

Comments
 (0)