13 changes: 13 additions & 0 deletions python/plugins/sextante/grass/description/r.stream.angle.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
r.stream.angle
r.stream.angle - Route azimuth, direction and relation to streams of higher order.
Raster (r.*)
ParameterRaster|stream|Input map: stream mask|False
ParameterRaster|dirs|Input map: direction map|False
ParameterRaster|elev|Input map: elevation map|True
ParameterSelection|order|Stream ordering method|none;hack;horton;strahler|0
ParameterNumber|length|Search length to calculat direction|1|None|15
ParameterNumber|skip|Skip segments shorter than|1|None|5
ParameterNumber|treshold|Max angle (degrees) beetwen stream segments to|1.0|360.0|150.0
ParameterBoolean|-r|Output angles in radians|False
ParameterBoolean|-e|Extended topology|False
OutputVector|seg_vector|Vector to store new network with segments
10 changes: 10 additions & 0 deletions python/plugins/sextante/grass/description/r.stream.basins.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
r.stream.basins
r.stream.basins - Calculate basins according user input
Raster (r.*)
ParameterRaster|dir|Input map: flow direction|False
ParameterRaster|stream|Input map: stream network|True
ParameterVector|points|Basins outlets|0|True
ParameterBoolean|-z|Create zero-value background|False
ParameterBoolean|-c|Use unique category sequence|False
ParameterBoolean|-l|Create basins only for last stream links|False
OutputRaster|basins|Output basin map
8 changes: 8 additions & 0 deletions python/plugins/sextante/grass/description/r.stream.del.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
r.stream.del
r.stream.del - Calculate basins according user input
Raster (r.*)
ParameterRaster|stream|Input map: stream mask|False
ParameterRaster|dir|Input map: flow direction|False
ParameterNumber|threshold|Minimum number of cell in stream|1|None|1
ParameterBoolean|-z|Create zero-value background|False
OutputRaster|reduced|Output reduced stream map
12 changes: 12 additions & 0 deletions python/plugins/sextante/grass/description/r.stream.distance.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
r.stream.distance
r.stream.distance - Calculate distance to and elevation above streams and outlets
Raster (r.*)
ParameterRaster|stream|Input map: streams (outlets) mask|False
ParameterRaster|dir|Input map: flow direction|False
ParameterRaster|dem|Input map: elevation map|True
ParameterSelection|method|Calculation method|upstream,downstream|1
ParameterBoolean|-o|Calculate parameters for outlets|False
ParameterBoolean|-s|Calculate parameters for subbasins|False
ParameterBoolean|-n|Calculate nearest local maximum|False
OutputRaster|elevation|Output elevation map
OutputRaster|distance|Output distance map
13 changes: 13 additions & 0 deletions python/plugins/sextante/grass/description/r.stream.extract.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
r.stream.extract
r.stream.extract - Stream network extraction
Raster (r.*)
ParameterRaster|elevation|Input map: elevation map|False
ParameterRaster|accumulation|Input map: accumulation map|True
ParameterRaster|depression|Input map: map with real depressions|True
ParameterNumber|threshold|Minimum flow accumulation for streams|1.0|None|0.1
ParameterNumber|mexp|Montgomery exponent for slope|0|None|0
ParameterNumber|stream_length|Delete stream segments shorter than cells|0|None|0
ParameterNumber|d8cut|Use SFD above this threshold|0|None|0
OutputRaster|stream_rast|Output raster map with unique stream ids
OutputVector|stream_vect|Output vector with unique stream ids
OutputRaster|direction|Output raster map with flow direction
11 changes: 11 additions & 0 deletions python/plugins/sextante/grass/description/r.stream.order.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
r.stream.order
r.stream.order - Calculate Strahler's and Horton's stream order Hack's main streams and Shreeve's stream magnitude
Raster (r.*)
ParameterRaster|stream|Input map: stream mask|False
ParameterRaster|dir|Input map: direction map|False
ParameterBoolean|-z|Create zero-value background|False
OutputRaster|strahler|Output basin map (Strahler)
OutputRaster|shreve|Output basin map (Shreve)
OutputRaster|horton|Output basin map (Horton)
OutputRaster|hack|Output basin map (Hack)
OutputRaster|top|Output basin map (Top)
9 changes: 9 additions & 0 deletions python/plugins/sextante/grass/description/r.stream.pos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
r.stream.pos
r.stream.pos - Route azimuth, direction and relation to streams of higher order
Raster (r.*)
ParameterRaster|stream|Input map: stream mask|False
ParameterRaster|dir|Input map: flow direction|False
ParameterNumber|multiplier|Multipier to store stream index value|1|None|1000
ParameterBoolean|-s|Create new stream category sequence|False
OutputFile|cells|File to store pixel's position
OutputFile|lengths|File to store current stream length
6 changes: 6 additions & 0 deletions python/plugins/sextante/grass/description/r.stream.stats.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
r.stream.stats
r.stream.stats - Calculate Horton's and optionally Hack's statistics
Raster (r.*)
ParameterRaster|stream|Input map: stream mask|False
ParameterRaster|dir|Input map: flow direction|False
ParameterRaster|dem|Input map: elevation|False
31 changes: 15 additions & 16 deletions python/plugins/sextante/gui/SextanteToolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
***************************************************************************
"""


__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
Expand Down Expand Up @@ -47,23 +46,22 @@
_fromUtf8 = lambda s: s

class SextanteToolbox(QDockWidget, Ui_SextanteToolbox):

USE_CATEGORIES = "/SextanteQGIS/UseCategories"



def __init__(self, iface):
QDockWidget.__init__(self, None)
self.setupUi(self)
self.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)

self.iface=iface

self.modeComboBox.clear()
self.modeComboBox.addItems(['Simplified interface', 'Advanced interface'])
settings = QSettings()
if not settings.contains(self.USE_CATEGORIES):
settings.setValue(self.USE_CATEGORIES, True)
useCategories = settings.value(self.USE_CATEGORIES).toBool()
settings.setValue(self.USE_CATEGORIES, True)
useCategories = settings.value(self.USE_CATEGORIES).toBool()
if useCategories:
self.modeComboBox.setCurrentIndex(0)
else:
Expand All @@ -79,15 +77,15 @@ def __init__(self, iface):
self.searchBox.setPlaceholderText(self.tr("Search..."))

self.fillTree()

def modeHasChanged(self):
idx = self.modeComboBox.currentIndex()
settings = QSettings()
if idx == 0: #simplified
settings.setValue(self.USE_CATEGORIES, True)
settings.setValue(self.USE_CATEGORIES, True)
else:
settings.setValue(self.USE_CATEGORIES, False)
settings.setValue(self.USE_CATEGORIES, False)

self.fillTree()

def algsListHasChanged(self):
Expand All @@ -111,12 +109,15 @@ def showPopupMenu(self,point):
executeBatchAction = QAction(self.tr("Execute as batch process"), self.algorithmTree)
executeBatchAction.triggered.connect(self.executeAlgorithmAsBatchProcess)
popupmenu.addAction(executeBatchAction)
popupmenu.addSeparator()
editRenderingStylesAction = QAction(self.tr("Edit rendering styles for outputs"), self.algorithmTree)
editRenderingStylesAction.triggered.connect(self.editRenderingStyles)
popupmenu.addAction(editRenderingStylesAction)
actions = Sextante.contextMenuActions
if len(actions) > 0:
popupmenu.addSeparator()
for action in actions:
action.setData(alg,self)
action.setData(alg, self)
if action.isEnabled():
contextMenuAction = QAction(action.name, self.algorithmTree)
contextMenuAction.triggered.connect(action.execute)
Expand Down Expand Up @@ -173,7 +174,7 @@ def executeAlgorithm(self):

def fillTree(self):
settings = QSettings()
useCategories = settings.value(self.USE_CATEGORIES).toBool()
useCategories = settings.value(self.USE_CATEGORIES).toBool()
if useCategories:
self.fillTreeUsingCategories()
else:
Expand Down Expand Up @@ -307,7 +308,7 @@ def fillTreeUsingCategories(self):
if (text != ""):
self.algorithmTree.expandAll()

def fillTreeUsingProviders(self):
def fillTreeUsingProviders(self):
self.algorithmTree.clear()
text = unicode(self.searchBox.text())
for providerName in Sextante.algs.keys():
Expand Down Expand Up @@ -357,8 +358,6 @@ def fillTreeUsingProviders(self):
for groupItem in groups.values():
groupItem.setExpanded(text != "")



class TreeAlgorithmItem(QTreeWidgetItem):

def __init__(self, alg):
Expand Down