File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 5
5
from sextante .gdal .GdalUtils import GdalUtils
6
6
from sextante .parameters .ParameterString import ParameterString
7
7
from sextante .outputs .OutputVector import OutputVector
8
+ from sextante .core .SextanteUtils import SextanteUtils
8
9
9
10
class polygonize (GeoAlgorithm ):
10
11
@@ -24,11 +25,14 @@ def defineCharacteristics(self):
24
25
self .addOutput (OutputVector (polygonize .OUTPUT , "Output layer" ))
25
26
26
27
def processAlgorithm (self , progress ):
27
- commands = ["gdal_polygonize" ]
28
+ if SextanteUtils .isWindows ():
29
+ commands = ["cmd.exe" , "/C " , "gdal_polygonize.bat" ]
30
+ else :
31
+ commands = ["gdal_polygonize.py" ]
28
32
commands .append (self .getParameterValue (polygonize .INPUT ))
29
- commands .append ("-f" )
30
- commands .append ("ESRI Shapefile" )
33
+ commands .append ('-f' )
34
+ commands .append (' "ESRI Shapefile"' )
31
35
commands .append (self .getOutputValue (polygonize .OUTPUT ))
32
36
commands .append (self .getParameterValue (polygonize .FIELD ))
33
-
37
+
34
38
GdalUtils .runGdal (commands , progress )
You can’t perform that action at this time.
0 commit comments