Skip to content
Permalink
Browse files

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
  • Loading branch information
alexbruy committed Feb 17, 2015
2 parents da0822c + e62a7fa commit 1b0fb4801200898d0458af6ecdfdb7b7790928ab
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/plugins/processing/algs/gdal/ogr2ogrclip.py
@@ -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
@@ -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)

0 comments on commit 1b0fb48

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