Skip to content

Commit

Permalink
edited GRASS and SAGA algorithm descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Jan 27, 2013
1 parent 250e2a5 commit b290272
Show file tree
Hide file tree
Showing 57 changed files with 139 additions and 493 deletions.
15 changes: 8 additions & 7 deletions python/plugins/sextante/core/QGisLayers.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,17 @@ def loadList(layers):
QGisLayers.load(layer)

@staticmethod
def load(layer, name = None, crs = None, style = None):
if layer == None:
def load(fileName, name = None, crs = None, style = None):
if fileName == None:
return
prjSetting = None
settings = QSettings()
if crs != None:
prjSetting = settings.value("/Projections/defaultBehaviour")
settings.setValue("/Projections/defaultBehaviour", QVariant(""))
if name == None:
name = path.split(layer)[1]
qgslayer = QgsVectorLayer(layer, name , 'ogr')
name = path.split(fileName)[1]
qgslayer = QgsVectorLayer(fileName, name , 'ogr')
if qgslayer.isValid():
if crs is not None and qgslayer.crs() is None:
qgslayer.setCrs(crs, False)
Expand All @@ -139,7 +139,7 @@ def load(layer, name = None, crs = None, style = None):
qgslayer.loadNamedStyle(style)
QgsMapLayerRegistry.instance().addMapLayers([qgslayer])
else:
qgslayer = QgsRasterLayer(layer, name)
qgslayer = QgsRasterLayer(fileName, name)
if qgslayer.isValid():
if crs != None:
qgslayer.setCrs(crs,False)
Expand All @@ -151,11 +151,12 @@ def load(layer, name = None, crs = None, style = None):
else:
if prjSetting:
settings.setValue("/Projections/defaultBehaviour", prjSetting)
raise RuntimeError("Could not load layer: " + unicode(layer)
+"\nCheck the SEXTANTE log to look for errors in algorithm execution")
raise RuntimeError("Could not load layer: " + unicode(fileName)
+"\nCheck the SEXTANTE log to look for errors")
if prjSetting:
settings.setValue("/Projections/defaultBehaviour", prjSetting)

return qgslayer

@staticmethod
def loadFromDict(layersdict, crs):
Expand Down
7 changes: 5 additions & 2 deletions python/plugins/sextante/core/Sextante.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,12 @@ def getObjectFromName(name):
def getObjectFromUri(uri):
return QGisLayers.getObjectFromUri(uri, False)

def load(layer):
def load(path):
'''Loads a layer into QGIS'''
QGisLayers.load(layer)
return QGisLayers.load(path)

def features(layer):
return QGisLayers.features(layer)

def loadFromAlg(layersdict):
'''Load all layer resulting from a given algorithm.
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/sextante/grass/description/r.stats.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
r.stats
r.stats - Generates area statistics for raster map layers.
r.stats - Generates area statistics for raster layers.
Raster (r.*)
ParameterMultipleInput|input|Name of input raster map|3.0|False
OutputFile|output|Name for output file (if omitted or "-" output to stdout)
ParameterString|fs|Output field separator|space
ParameterString|nv|String representing no data cell value|*
ParameterString|nsteps|Number of fp subranges to collect stats from|255
Expand All @@ -19,3 +18,4 @@ ParameterBoolean|-n|Suppress reporting of any NULLs|False
ParameterBoolean|-N|Suppress reporting of NULLs when all values are NULL|False
ParameterBoolean|-C|Report for cats fp ranges (fp maps only)|False
ParameterBoolean|-i|Read fp map as integer (use map's quant rules)|False
OutputHTML|html|Output stats file
46 changes: 18 additions & 28 deletions python/plugins/sextante/grass/description/r.sun.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
r.sun
r.sun - Solar irradiance and irradiation model.
Raster (r.*)
ParameterRaster|elevin|Name of the input elevation raster map [meters]|False
ParameterRaster|aspin|Name of the input aspect map (terrain aspect or azimuth of the solar panel) [decimal degrees]|False
ParameterNumber|aspect|A single value of the orientation (aspect), 270 is south|None|None|270.0
ParameterRaster|elevin|Elevation layer [meters]|False
ParameterRaster|aspin|Aspect layer [decimal degrees]|False
ParameterRaster|slopein|Name of the input slope raster map (terrain slope or solar panel inclination) [decimal degrees]|False
ParameterNumber|slope|A single value of inclination (slope)|None|None|0.0
ParameterRaster|linkein|Name of the Linke atmospheric turbidity coefficient input raster map [-]|False
ParameterNumber|lin|A single value of the Linke atmospheric turbidity coefficient [-]|None|None|3.0
ParameterRaster|albedo|Name of the ground albedo coefficient input raster map [-]|False
ParameterNumber|alb|A single value of the ground albedo coefficient [-]|None|None|0.2
ParameterRaster|latin|Name of input raster map containing latitudes [decimal degrees]|False
ParameterRaster|longin|Name of input raster map containing longitudes [decimal degrees]|False
ParameterRaster|coefbh|Name of real-sky beam radiation coefficient input raster map [-]|False
ParameterRaster|coefdh|Name of real-sky diffuse radiation coefficient input raster map [-]|False
ParameterRaster|horizon|The horizon information input map prefix|False
ParameterNumber|horizonstep|Angle step size for multidirectional horizon [degrees]|None|None|0.0
ParameterNumber|day|No. of day of the year (1-365)|None|None|0.0
ParameterNumber|step|Time step when computing all-day radiation sums [decimal hours]|None|None|0.5
ParameterNumber|declin|Declination value (overriding the internally computed value) [radians]|None|None|0.0
ParameterNumber|time|Local (solar) time (to be set for mode 1 only) [decimal hours]|None|None|0.0
ParameterNumber|dist|Sampling distance step coefficient (0.5-1.5)|None|None|1.0
ParameterNumber|numpartitions|Read the input files in this number of chunks|None|None|1.0
ParameterNumber|civiltime|Civil time zone value, if none, the time will be local solar time|None|None|0.0
ParameterRaster|linkein|Name of the Linke atmospheric turbidity coefficient input raster map|True
ParameterRaster|albedo|Name of the ground albedo coefficient input raster map|True
ParameterRaster|latin|Name of input raster map containing latitudes [decimal degrees]|True
ParameterRaster|longin|Name of input raster map containing longitudes [decimal degrees]|True
ParameterRaster|coefbh|Name of real-sky beam radiation coefficient input raster map|True
ParameterRaster|coefdh|Name of real-sky diffuse radiation coefficient input raster map|True
ParameterNumber|day|No. of day of the year (1-365)|1|365|1
*ParameterNumber|step|Time step when computing all-day radiation sums [decimal hours]|0|None|0.5
*ParameterNumber|declin|Declination value (overriding the internally computed value) [radians]|None|None|0.0
*ParameterNumber|dist|Sampling distance step coefficient (0.5-1.5)|0.5|1.5|1.0
ParameterBoolean|-s|Incorporate the shadowing effect of terrain|False
ParameterBoolean|-m|Use the low-memory version of the program|False
OutputRaster|incidout|Output incidence angle raster map (mode 1 only)
OutputRaster|beam_rad|Output beam irradiance [W.m-2] (mode 1) or irradiation raster map [Wh.m-2.day-1] (mode 2)
OutputRaster|insol_time|Output insolation time raster map [h] (mode 2 only)
OutputRaster|diff_rad|Output diffuse irradiance [W.m-2] (mode 1) or irradiation raster map [Wh.m-2.day-1] (mode 2)
OutputRaster|refl_rad|Output ground reflected irradiance [W.m-2] (mode 1) or irradiation raster map [Wh.m-2.day-1] (mode 2)
OutputRaster|glob_rad|Output global (total) irradiance/irradiation [W.m-2] (mode 1) or irradiance/irradiation raster map [Wh.m-2.day-1] (mode 2)
*ParameterBoolean|-m|Use the low-memory version of the program|False
OutputRaster|beam_rad|Output irradiation layer [Wh.m-2.day-1]
OutputRaster|insol_time|Output insolation time layer [h]
OutputRaster|diff_rad|Outpu diffuse irradiation layer [Wh.m-2.day-1]
OutputRaster|refl_rad|Output ground reflected irradiation layer [Wh.m-2.day-1]
OutputRaster|glob_rad|Output global (total) irradiance/irradiation layer [Wh.m-2.day-1]
29 changes: 13 additions & 16 deletions python/plugins/sextante/grass/description/r.sunmask.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ r.sunmask
r.sunmask - Calculates cast shadow areas from sun position and elevation raster map.
Raster (r.*)
ParameterRaster|elev|elev|False
ParameterNumber|altitude|altitude|None|None|0.0
ParameterNumber|azimuth|azimuth|None|None|0.0
ParameterNumber|year|year|None|None|0.0
ParameterNumber|month|month|None|None|1
ParameterNumber|day|day|None|None|1
ParameterNumber|hour|hour|None|None|0
ParameterNumber|minute|minute|None|None|0
ParameterNumber|second|second|None|None|0
ParameterNumber|timezone|timezone|None|None|0.0
ParameterNumber|east|east|None|None|0.0
ParameterNumber|north|north|None|None|0.0
ParameterBoolean|-z|-z|True
ParameterBoolean|-v|-v|True
ParameterBoolean|-s|-s|True
ParameterBoolean|-g|-g|True
OutputRaster|output|Name for output raster map
ParameterNumber|altitude|altitude|0|90|0.0
ParameterNumber|azimuth|azimuth|0|360|0.0
ParameterNumber|year|year|1950|2050|2000
ParameterNumber|month|month|0|12|1
ParameterNumber|day|day|0|31|1
ParameterNumber|hour|hour|0|24|1
ParameterNumber|minute|minute|0|60|0
ParameterNumber|second|second|0|60|0
ParameterNumber|timezone|East positive, offset from GMT|0|None|0.0
ParameterNumber|east|Easting coordinate (point of interest)|None|None|0.0
ParameterNumber|north|Northing coordinate (point of interest)|None|None|0.0
ParameterBoolean|-z|Don't ignore zero elevation|True
OutputRaster|output|Output layer
4 changes: 2 additions & 2 deletions python/plugins/sextante/grass/description/r.surf.area.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r.surf.area
r.surf.area - Surface area estimation for rasters.
Raster (r.*)
ParameterRaster|input|Name of input raster map|False
ParameterNumber|vscale|Vertical scale|None|None|0.0
ParameterRaster|input|Input layer|False
ParameterNumber|vscale|Vertical scale|None|None|1
4 changes: 2 additions & 2 deletions python/plugins/sextante/grass/description/r.surf.contour.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r.surf.contour
r.surf.contour - Surface generation program from rasterized contours.
Raster (r.*)
ParameterRaster|input|Name of input raster map|False
OutputRaster|output|Name for output raster map
ParameterRaster|input|Raster layer with rasterized contours|False
OutputRaster|output|Output raster layer
4 changes: 2 additions & 2 deletions python/plugins/sextante/grass/description/r.surf.gauss.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r.surf.gauss
r.surf.gauss - Creates a raster map layer of Gaussian deviates.
r.surf.gauss - Creates a raster layer of Gaussian deviates.
Raster (r.*)
ParameterString|mean|Distribution mean|0.0
ParameterString|sigma|Standard deviation|1.0
OutputRaster|output|Name for output raster map
OutputRaster|output|Output raster layer
8 changes: 4 additions & 4 deletions python/plugins/sextante/grass/description/r.surf.idw.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
r.surf.idw
r.surf.idw - Surface interpolation utility for raster map.
r.surf.idw - Surface interpolation utility for raster layers.
Raster (r.*)
ParameterRaster|input|Name of input raster map|False
ParameterNumber|npoints|Number of interpolation points|1.0|None|12
ParameterRaster|input|Name of input raster layer|False
ParameterNumber|npoints|Number of interpolation points|1|None|12
ParameterBoolean|-e|Output is the interpolation error|False
OutputRaster|output|Name for output raster map
OutputRaster|output|Output raster layer
8 changes: 4 additions & 4 deletions python/plugins/sextante/grass/description/r.surf.idw2.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r.surf.idw2
r.surf.idw2 - Surface generation program.
r.surf.idw2 - Surface generation.
Raster (r.*)
ParameterRaster|input|Name of input raster map|False
ParameterNumber|npoints|Number of interpolation points|1.0|None|12
OutputRaster|output|Name for output raster map
ParameterRaster|input|Input raster layer|False
ParameterNumber|npoints|Number of interpolation points|1|None|12
OutputRaster|output|Output raster layer
6 changes: 3 additions & 3 deletions python/plugins/sextante/grass/description/r.surf.random.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
r.surf.random
r.surf.random - Produces a raster map of uniform random deviates whose range can be expressed by the user.
r.surf.random - Produces a raster layer of uniform random deviates whose range can be expressed by the user.
Raster (r.*)
ParameterNumber|min|Minimum random value|None|None|0
ParameterNumber|max|Maximum random value|None|None|100
ParameterBoolean|-i|Create an integer raster map|False
OutputRaster|output|Name for output raster map
ParameterBoolean|-i|Create an integer raster layer|False
OutputRaster|output|Output raster layer
22 changes: 0 additions & 22 deletions python/plugins/sextante/grass/description/r.texture.txt

This file was deleted.

6 changes: 3 additions & 3 deletions python/plugins/sextante/grass/description/r.thin.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
r.thin
r.thin - Thins non-zero cells that denote linear features in a raster map.
r.thin - Thins non-zero cells that denote linear features in a raster layer.
Raster (r.*)
ParameterRaster|input|Name of input raster map|False
ParameterRaster|input|Input raster layer to thin|False
ParameterString|iterations|Maximal number of iterations|200
OutputRaster|output|Name for output raster map
OutputRaster|output|Output thinned raster
10 changes: 3 additions & 7 deletions python/plugins/sextante/grass/description/r.to.vect.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
r.to.vect
r.to.vect - Converts a raster map into a vector map layer.
r.to.vect - Converts a raster into a vector layer.
Raster (r.*)
ParameterRaster|input|Name of input raster map|False
ParameterRaster|input|Input raster layer|False
ParameterSelection|feature|Feature type|line;point;area
ParameterBoolean|-s|Smooth corners of area features|False
ParameterBoolean|-v|Use raster values as categories instead of unique sequence (CELL only)|False
ParameterBoolean|-z|Write raster values as z coordinate. Table is not created. Currently supported only for points|False
ParameterBoolean|-b|Do not build vector topology (use with care for massive point export)|False
ParameterBoolean|-q|Quiet - Do not show progress|False
OutputVector|output|Name for output vector map
OutputVector|output|Output vector layer
6 changes: 3 additions & 3 deletions python/plugins/sextante/grass/description/r.topidx.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r.topidx
r.topidx - Creates topographic index map from elevation raster map.
r.topidx - Creates topographic index layer from elevation raster layer
Raster (r.*)
ParameterRaster|input|Input elevation map|False
OutputRaster|Output topographic index map|output
ParameterRaster|input|Input elevation layer|False
OutputRaster|Output topographic index layer|output
18 changes: 0 additions & 18 deletions python/plugins/sextante/grass/description/r.topmodel.txt

This file was deleted.

6 changes: 0 additions & 6 deletions python/plugins/sextante/grass/description/r.transect.txt

This file was deleted.

10 changes: 0 additions & 10 deletions python/plugins/sextante/grass/description/r.univar.txt

This file was deleted.

6 changes: 3 additions & 3 deletions python/plugins/sextante/grass/description/r.volume.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
r.volume
r.volume - Calculates the volume of data "clumps".
Raster (r.*)
ParameterRaster|data|Existing raster map representing data that will be summed within clumps|False
ParameterRaster|clump|Existing raster map, preferably the output of r.clump|False
ParameterBoolean|-f|Generate unformatted report|False
ParameterRaster|data|Layer representing data that will be summed within clumps|False
ParameterRaster|clump|Clumps layer (preferably the output of r.clump)|False
*ParameterBoolean|-f|Generate unformatted report|False
OutputVector|centroids|Vector points map to contain clump centroids
24 changes: 10 additions & 14 deletions python/plugins/sextante/grass/description/r.walk.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
r.walk
r.walk - Outputs a raster map layer showing the anisotropic cumulative cost of moving based on friction cost.
r.walk - Outputs a raster layer showing the anisotropic cumulative cost of moving based on friction cost.
Raster (r.*)
ParameterRaster|elevation|Name of elevation input raster map|False
ParameterRaster|friction|Name of input raster map containing friction costs|False
ParameterVector|start_points|Starting points vector map|-1|False
ParameterVector|stop_points|Stop points vector map|-1|False
ParameterString|coordinate|The map E and N grid coordinates of a starting point (E,N)|
ParameterString|stop_coordinate|The map E and N grid coordinates of a stopping point (E,N)|
ParameterRaster|elevation|Elevation raster layer|False
ParameterRaster|friction|Friction costs layer|False
ParameterVector|start_points|Starting points|-1|False
ParameterString|max_cost|An optional maximum cumulative cost|0
ParameterString|null_cost|Cost assigned to null cells. By default, null cells are excluded|
ParameterString|percent_memory|Percent of map to keep in memory|100
ParameterString|nseg|Number of the segment to create (segment library)|4
ParameterString|walk_coeff|Coefficients for walking energy formula parameters a,b,c,d|0.72,6.0,1.9998,-1.9998
ParameterString|lambda|Lambda coefficients for combining walking energy and friction cost|1.0
*ParameterString|walk_coeff|Coefficients for walking energy formula parameters a,b,c,d|0.72,6.0,1.9998,-1.9998
*ParameterString|lambda|Lambda coefficients for combining walking energy and friction cost|1.0
ParameterString|slope_factor|Slope factor determines travel energy cost per height step|-0.2125
ParameterBoolean|-k|Use the 'Knight's move'; slower, but more accurate|True
ParameterBoolean|-n|Keep null values in output map|True
ParameterBoolean|-r|Start with values in raster map|True
OutputRaster|output|Name of raster map to contain results
*ParameterBoolean|-k|Use the 'Knight's move'; slower, but more accurate|True
*ParameterBoolean|-n|Keep null values in output map|True
*ParameterBoolean|-r|Start with values in raster map|True
OutputRaster|output|Output cost layer
6 changes: 3 additions & 3 deletions python/plugins/sextante/grass/description/r.water.outlet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ r.water.outlet
r.water.outlet - Watershed basin creation program.
Raster (r.*)
ParameterRaster|drainage|Name of input raster map|False
ParameterNumber|easting|The map E grid coordinates|None|None|0
ParameterNumber|northing|The map N grid coordinates|None|None|0
OutputRaster|basin|Name of raster map to contain results
ParameterNumber|easting|Easting coordinate of outlet point|None|None|0
ParameterNumber|northing|Northing coordinate of outlet point|None|None|0
OutputRaster|basin|Output basin layer
Loading

0 comments on commit b290272

Please sign in to comment.