Skip to content

Commit

Permalink
[gdal] fix polygonize (at least for linux)
Browse files Browse the repository at this point in the history
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 6e4bff4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/sextante/gdal/polygonize.py
Expand Up @@ -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):

Expand All @@ -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.