Skip to content

Commit

Permalink
ogr clip by polygon: clip polygon layer name must be declared to avoi…
Browse files Browse the repository at this point in the history
…d issues with postgis and spatialite layers
  • Loading branch information
Giovanni Manghi committed Feb 10, 2015
1 parent db17513 commit e62a7fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/algs/gdal/ogr2ogrclip.py
Expand Up @@ -58,7 +58,7 @@ def processAlgorithm(self, progress):
inLayer = self.getParameterValue(self.INPUT_LAYER)
ogrLayer = self.ogrConnectionString(inLayer)[1:-1]
clipLayer = self.getParameterValue(self.CLIP_LAYER)
ogrClipLayer = self.ogrConnectionString(clipLayer)
ogrClipLayer = self.ogrConnectionString(clipLayer)[1:-1]

output = self.getOutputFromName(self.OUTPUT_LAYER)
outFile = output.value
Expand All @@ -69,6 +69,8 @@ def processAlgorithm(self, progress):
arguments = []
arguments.append('-clipsrc')
arguments.append(ogrClipLayer)
arguments.append("-clipsrclayer")
arguments.append(self.ogrLayerName(clipLayer))
if len(options) > 0:
arguments.append(options)

Expand Down

0 comments on commit e62a7fa

Please sign in to comment.