Skip to content

Commit

Permalink
changed grass description. Now one grass algorithm can be splitted in…
Browse files Browse the repository at this point in the history
… several sextante ones

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@134 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed Apr 20, 2012
1 parent aa0a44b commit 66e027a
Show file tree
Hide file tree
Showing 147 changed files with 183 additions and 14 deletions.
4 changes: 3 additions & 1 deletion src/sextante/grass/GrassAlgorithm.py
Expand Up @@ -48,6 +48,8 @@ def helpFile(self):
def defineCharacteristicsFromFile(self):
lines = open(self.descriptionFile)
line = lines.readline().strip("\n").strip()
self.grassName = line
line = lines.readline().strip("\n").strip()
self.name = line
line = lines.readline().strip("\n").strip()
self.group = line
Expand Down Expand Up @@ -158,7 +160,7 @@ def processAlgorithm(self, progress):
commands.append(self.exportVectorLayer(layer))

#2: set parameters and outputs
command = self.name
command = self.grassName
for param in self.parameters:
if param.value == None:
continue
Expand Down
2 changes: 2 additions & 0 deletions src/sextante/grass/GrassAlgorithmProvider.py
Expand Up @@ -55,6 +55,7 @@ def createAlgsList(self):
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open GRASS algorithm: " + descriptionFile)
except Exception,e:
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open GRASS algorithm: " + descriptionFile)
self.createDescriptionFiles()

def _loadAlgorithms(self):
self.algs = self.preloadedAlgs
Expand All @@ -71,6 +72,7 @@ def createDescriptionFiles(self):
for alg in self.preloadedAlgs:
f = open (os.path.join(folder, alg.name +".txt"), "w")
f.write(alg.name + "\n")
f.write(alg.name + "\n")
f.write(alg.group + "\n")
for param in alg.parameters:
f.write(param.serialize() + "\n")
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.average.txt
@@ -1,4 +1,5 @@
r.average
r.average
Raster (r.*)
ParameterRaster|base|base|False
ParameterRaster|cover|cover|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.basins.fill.txt
@@ -1,4 +1,5 @@
r.basins.fill
r.basins.fill
Raster (r.*)
ParameterNumber|number|number|None|None|0.0
ParameterRaster|c_map|c_map|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.bilinear.txt
@@ -1,4 +1,5 @@
r.bilinear
r.bilinear
Raster (r.*)
ParameterRaster|input|input|False
ParameterNumber|north|north|None|None|0
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.bitpattern.txt
@@ -1,4 +1,5 @@
r.bitpattern
r.bitpattern
Raster (r.*)
ParameterRaster|input|input|False
ParameterString|pattern|pattern|
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.buffer.txt
@@ -1,4 +1,5 @@
r.buffer
r.buffer
Raster (r.*)
ParameterRaster|input|input|False
ParameterString|distances|distances|100,200,300
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.carve.txt
@@ -1,4 +1,5 @@
r.carve
r.carve
Raster (r.*)
ParameterRaster|rast|rast|False
ParameterVector|vect|vect|1|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.circle.txt
@@ -1,4 +1,5 @@
r.circle
r.circle
Raster (r.*)
ParameterString|coordinate|coordinate|0,0
ParameterNumber|min|min|None|None|10
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.clump.txt
@@ -1,4 +1,5 @@
r.clump
r.clump
Raster (r.*)
ParameterRaster|input|input|False
ParameterString|title|title|
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.coin.txt
@@ -1,4 +1,5 @@
r.coin
r.coin
Raster (r.*)
ParameterRaster|map1|map1|False
ParameterRaster|map2|map2|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.colors.txt
@@ -1,4 +1,5 @@
r.colors
r.colors
Raster (r.*)
ParameterRaster|map|map|False
ParameterSelection|color|color|aspect;aspectcolr;bcyr;bgyr;byg;byr;celsius;corine;curvature;differences;elevation;etopo2;evi;gdd;grey;grey1.0;grey255;gyr;haxby;ndvi;population;precipitation;rainbow;ramp;rstcurv;ryb;ryg;sepia;slope;srtm;terrain;wave;random;grey.eq;grey.log;rules
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.composite.txt
@@ -1,4 +1,5 @@
r.composite
r.composite
Raster (r.*)
ParameterRaster|red|red|False
ParameterRaster|green|green|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.contour.txt
@@ -1,4 +1,5 @@
r.contour
r.contour
Raster (r.*)
ParameterRaster|input|input|False
ParameterString|levels|levels|
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.cost.txt
@@ -1,4 +1,5 @@
r.cost
r.cost
Raster (r.*)
ParameterRaster|input|input|False
ParameterVector|start_points|start_points|0|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.covar.txt
@@ -1,4 +1,5 @@
r.covar
r.covar
Raster (r.*)
ParameterMultipleInput|map|map|3.0|False
ParameterBoolean|-r|-r|True
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.cross.txt
@@ -1,4 +1,5 @@
r.cross
r.cross
Raster (r.*)
ParameterMultipleInput|input|input|3.0|False
ParameterBoolean|-z|-z|True
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.cva.txt
@@ -1,4 +1,5 @@
r.cva
r.cva
Raster (r.*)
ParameterRaster|input|input|False
ParameterRaster|target_mask|target_mask|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.describe.txt
@@ -1,4 +1,5 @@
r.describe
r.describe
Raster (r.*)
ParameterRaster|map|map|False
ParameterString|nv|nv|*
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.distance.txt
@@ -1,4 +1,5 @@
r.distance
r.distance
Raster (r.*)
ParameterRaster|maps|maps|False
ParameterString|fs|fs|:
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.drain.txt
@@ -1,4 +1,5 @@
r.drain
r.drain
Raster (r.*)
ParameterRaster|input|input|False
ParameterString|coordinate|coordinate(E,N)|
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.fill.dir.txt
@@ -1,4 +1,5 @@
r.fill.dir
r.fill.dir
Raster (r.*)
ParameterRaster|input|input|False
ParameterString|type|type|grass
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.fillnulls.txt
@@ -1,4 +1,5 @@
r.fillnulls
r.fillnulls
Raster (r.*)
ParameterRaster|input|input|False
ParameterNumber|tension|tension|None|None|40.0
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.flow.txt
@@ -1,4 +1,5 @@
r.flow
r.flow
Raster (r.*)
ParameterRaster|elevin|elevin|False
ParameterRaster|aspin|aspin|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.grow.distance.txt
@@ -1,4 +1,5 @@
r.grow.distance
r.grow.distance
Raster (r.*)
ParameterRaster|input|input|False
ParameterSelection|metric|metric|euclidean;squared;maximum;manhattan
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.grow.txt
@@ -1,4 +1,5 @@
r.grow
r.grow
Raster (r.*)
ParameterRaster|input|input|False
ParameterNumber|radius|radius|None|None|1.01
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.gwflow.txt
@@ -1,4 +1,5 @@
r.gwflow
r.gwflow
Raster (r.*)
ParameterString|phead|phead|
ParameterString|status|status|
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.his.txt
@@ -1,4 +1,5 @@
r.his
r.his
Raster (r.*)
ParameterRaster|h_map|h_map|False
ParameterRaster|i_map|i_map|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.horizon.txt
@@ -1,4 +1,5 @@
r.horizon
r.horizon
Raster (r.*)
ParameterRaster|elevin|elevin|False
ParameterNumber|direction|direction|None|None|0.0
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.info.txt
@@ -1,4 +1,5 @@
r.info
r.info
Raster (r.*)
ParameterRaster|map|map|False
ParameterBoolean|-r|-r|True
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.kappa.txt
@@ -1,4 +1,5 @@
r.kappa
r.kappa
Raster (r.*)
ParameterRaster|classification|classification|False
ParameterRaster|reference|reference|False
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.lake.txt
@@ -1,4 +1,5 @@
r.lake
r.lake
Raster (r.*)
ParameterRaster|dem|dem|False
ParameterString|wl|wl|
Expand Down
1 change: 1 addition & 0 deletions src/sextante/grass/description/r.los.txt