Skip to content
Permalink
Browse files
[gdal] fix polygonize (at least for linux)
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@92 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
julien.malik@gmail.com committed Apr 14, 2012
1 parent 21e6c16 commit 6e4bff485d6e18acf36fe35e680ce6d70bd054f1
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/sextante/gdal/polygonize.py
@@ -5,6 +5,7 @@
from sextante.gdal.GdalUtils import GdalUtils
from sextante.parameters.ParameterString import ParameterString
from sextante.outputs.OutputVector import OutputVector
from sextante.core.SextanteUtils import SextanteUtils

class polygonize(GeoAlgorithm):

@@ -24,11 +25,14 @@ def defineCharacteristics(self):
self.addOutput(OutputVector(polygonize.OUTPUT, "Output layer"))

def processAlgorithm(self, progress):
commands = ["gdal_polygonize"]
if SextanteUtils.isWindows():
commands = ["cmd.exe", "/C ", "gdal_polygonize.bat"]
else:
commands = ["gdal_polygonize.py"]
commands.append(self.getParameterValue(polygonize.INPUT))
commands.append("-f")
commands.append("ESRI Shapefile")
commands.append('-f')
commands.append('"ESRI Shapefile"')
commands.append(self.getOutputValue(polygonize.OUTPUT))
commands.append(self.getParameterValue(polygonize.FIELD))

GdalUtils.runGdal(commands, progress)

0 comments on commit 6e4bff4

Please sign in to comment.