Showing with 250 additions and 142 deletions.
  1. +2 −2 python/plugins/sextante/algs/FieldPyculator.py
  2. +1 −1 python/plugins/sextante/algs/ftools/Dissolve.py
  3. +6 −6 python/plugins/sextante/algs/mmqgisx/MMQGISXAlgorithms.py
  4. +8 −0 python/plugins/sextante/core/Sextante.py
  5. +2 −2 python/plugins/sextante/core/SextanteConfig.py
  6. +9 −0 python/plugins/sextante/grass/GrassAlgorithm.py
  7. +2 −2 python/plugins/sextante/grass/GrassUtils.py
  8. +1 −1 python/plugins/sextante/grass/description/v.buffer.column.txt
  9. +1 −1 python/plugins/sextante/grass/description/v.class.txt
  10. +1 −1 python/plugins/sextante/grass/description/v.dissolve.txt
  11. +2 −2 python/plugins/sextante/grass/description/v.distance.toattr.txt
  12. +1 −1 python/plugins/sextante/grass/description/v.distance.txt
  13. +1 −1 python/plugins/sextante/grass/description/v.normal.txt
  14. +1 −1 python/plugins/sextante/grass/description/v.reclass.txt
  15. +1 −1 python/plugins/sextante/grass/description/v.sample.txt
  16. +1 −1 python/plugins/sextante/grass/description/v.surf.bspline.txt
  17. +1 −1 python/plugins/sextante/grass/description/v.surf.idw.txt
  18. +1 −1 python/plugins/sextante/grass/description/v.surf.rst.cvdev.txt
  19. +1 −1 python/plugins/sextante/grass/description/v.surf.rst.txt
  20. +1 −1 python/plugins/sextante/grass/description/v.to.rast.attribute.txt
  21. +1 −1 python/plugins/sextante/grass/description/v.univar.txt
  22. +57 −0 python/plugins/sextante/gui/MissingDependencyDialog.py
  23. +5 −1 python/plugins/sextante/gui/SextanteToolbox.py
  24. +1 −1 python/plugins/sextante/modeler/models/contours.model
  25. +1 −1 python/plugins/sextante/modeler/models/fieldautoextent.model
  26. +1 −1 python/plugins/sextante/modeler/models/fieldextent.model
  27. +1 −1 python/plugins/sextante/modeler/models/numericaloutput.model
  28. +1 −1 python/plugins/sextante/parameters/ParameterBoolean.py
  29. +3 −3 python/plugins/sextante/parameters/ParameterCrs.py
  30. +5 −5 python/plugins/sextante/parameters/ParameterExtent.py
  31. +1 −1 python/plugins/sextante/parameters/ParameterFactory.py
  32. +3 −3 python/plugins/sextante/parameters/ParameterFile.py
  33. +1 −1 python/plugins/sextante/parameters/ParameterFixedTable.py
  34. +1 −1 python/plugins/sextante/parameters/ParameterMultipleInput.py
  35. +4 −4 python/plugins/sextante/parameters/ParameterNumber.py
  36. +2 −2 python/plugins/sextante/parameters/ParameterRange.py
  37. +1 −1 python/plugins/sextante/parameters/ParameterRaster.py
  38. +3 −3 python/plugins/sextante/parameters/ParameterSelection.py
  39. +2 −2 python/plugins/sextante/parameters/ParameterString.py
  40. +1 −1 python/plugins/sextante/parameters/ParameterTable.py
  41. +10 −7 python/plugins/sextante/parameters/ParameterTableField.py
  42. +1 −1 python/plugins/sextante/parameters/ParameterVector.py
  43. +7 −1 python/plugins/sextante/saga/SagaAlgorithm.py
  44. +1 −1 python/plugins/sextante/saga/SagaUtils.py
  45. +1 −1 python/plugins/sextante/saga/description/AddPolygonAttributestoPoints.txt
  46. +7 −7 python/plugins/sextante/saga/description/AggregatePointObservations.txt
  47. +1 −1 python/plugins/sextante/saga/description/B-SplineApproximation.txt
  48. +1 −1 python/plugins/sextante/saga/description/ChangeDateFormat.txt
  49. +6 −6 python/plugins/sextante/saga/description/ChangeDetection.txt
  50. +1 −1 python/plugins/sextante/saga/description/ChangeTimeFormat.txt
  51. +1 −1 python/plugins/sextante/saga/description/ClipPointswithPolygons.txt
  52. +2 −2 python/plugins/sextante/saga/description/ConvertPointstoLine(s).txt
  53. +2 −2 python/plugins/sextante/saga/description/ConvertTabletoPoints.txt
  54. +1 −1 python/plugins/sextante/saga/description/CubicSplineApproximation.txt
  55. +1 −1 python/plugins/sextante/saga/description/EnumerateTableField.txt
  56. +1 −1 python/plugins/sextante/saga/description/FillGapsinRecords.txt
  57. +1 −1 python/plugins/sextante/saga/description/GeographicallyWeightedMultipleRegression(Points).txt
  58. +1 −1 python/plugins/sextante/saga/description/GeographicallyWeightedMultipleRegression(PointsGrids).txt
  59. +1 −1 python/plugins/sextante/saga/description/GeographicallyWeightedMultipleRegression.txt
  60. +1 −1 python/plugins/sextante/saga/description/GeographicallyWeightedRegression(PointsGrid).txt
  61. +2 −2 python/plugins/sextante/saga/description/GeographicallyWeightedRegression.txt
  62. +1 −1 python/plugins/sextante/saga/description/InverseDistanceWeighted.txt
  63. +1 −1 python/plugins/sextante/saga/description/KernelDensityEstimation.txt
  64. +3 −3 python/plugins/sextante/saga/description/LineDissolve.txt
  65. +1 −1 python/plugins/sextante/saga/description/ModifedQuadraticShepard.txt
  66. +1 −1 python/plugins/sextante/saga/description/MultilevelB-SplineInterpolation.txt
  67. +1 −1 python/plugins/sextante/saga/description/MultipleRegressionAnalysis(PointsGrids).txt
  68. +1 −1 python/plugins/sextante/saga/description/NaturalNeighbour.txt
  69. +1 −1 python/plugins/sextante/saga/description/NearestNeighbour.txt
  70. +1 −1 python/plugins/sextante/saga/description/OrdinaryKriging(Global).txt
  71. +1 −1 python/plugins/sextante/saga/description/OrdinaryKriging.txt
  72. +1 −1 python/plugins/sextante/saga/description/PointsFilter.txt
  73. +1 −1 python/plugins/sextante/saga/description/PointsThinning.txt
  74. +1 −1 python/plugins/sextante/saga/description/PolartoCartesianCoordinates.txt
  75. +3 −3 python/plugins/sextante/saga/description/PolygonDissolve.txt
  76. +2 −2 python/plugins/sextante/saga/description/PolygonIntersection.txt
  77. +1 −1 python/plugins/sextante/saga/description/PolynomialRegression.txt
  78. +2 −2 python/plugins/sextante/saga/description/Profilefrompoints.txt
  79. +1 −1 python/plugins/sextante/saga/description/ProfilesfromLines.txt
  80. +1 −1 python/plugins/sextante/saga/description/QuadTreeStructuretoShapes.txt
  81. +1 −1 python/plugins/sextante/saga/description/RegressionAnalysis(PointsGrid).txt
  82. +1 −1 python/plugins/sextante/saga/description/RemoveDuplicatePoints.txt
  83. +1 −1 python/plugins/sextante/saga/description/RunningAverage.txt
  84. +1 −1 python/plugins/sextante/saga/description/ShapesBuffer.txt
  85. +1 −1 python/plugins/sextante/saga/description/ShapestoGrid.txt
  86. +1 −1 python/plugins/sextante/saga/description/SupervisedClassification.txt
  87. +1 −1 python/plugins/sextante/saga/description/ThinPlateSpline(Global).txt
  88. +1 −1 python/plugins/sextante/saga/description/ThinPlateSpline(Local).txt
  89. +1 −1 python/plugins/sextante/saga/description/ThinPlateSpline(TIN).txt
  90. +1 −1 python/plugins/sextante/saga/description/Transectthroughpolygonshapefile.txt
  91. +1 −1 python/plugins/sextante/saga/description/Triangulation.txt
  92. +1 −1 python/plugins/sextante/saga/description/UniversalKriging(Global).txt
  93. +1 −1 python/plugins/sextante/saga/description/UniversalKriging.txt
  94. +1 −1 python/plugins/sextante/saga/description/VariogramCloud.txt
  95. +1 −1 python/plugins/sextante/saga/description/VariogramSurface.txt
  96. +21 −0 python/plugins/sextante/tests/QgisAlgsTest.py
4 changes: 2 additions & 2 deletions python/plugins/sextante/algs/FieldPyculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY, False))
self.addParameter(ParameterString(self.FIELD_NAME, "Result field name", "NewField"))
self.addParameter(ParameterSelection(self.FIELD_TYPE, "Field type", self.TYPE_NAMES))
self.addParameter(ParameterNumber(self.FIELD_LENGTH, "Field lenght", 1, 255, 10))
self.addParameter(ParameterNumber(self.FIELD_LENGTH, "Field length", 1, 255, 10))
self.addParameter(ParameterNumber(self.FIELD_PRECISION, "Field precision", 0, 10, 0))
self.addParameter(ParameterString(self.GLOBAL, "Global expression", multiline = True))
self.addParameter(ParameterString(self.GLOBAL, "Global expression", multiline = True, optional = True))
self.addParameter(ParameterString(self.FORMULA, "Formula", "value = ", multiline = True))
self.addOutput(OutputVector(self.OUTPUT_LAYER, "Output layer"))

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/Dissolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def defineCharacteristics(self):
self.group = "Vector geometry tools"
self.addParameter(ParameterVector(Dissolve.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_POLYGON))
self.addParameter(ParameterBoolean(Dissolve.DISSOLVE_ALL, "Dissolve all (do not use field)", True))
self.addParameter(ParameterTableField(Dissolve.FIELD, "Unique ID field",Dissolve.INPUT ))
self.addParameter(ParameterTableField(Dissolve.FIELD, "Unique ID field",Dissolve.INPUT, optional=True ))
self.addOutput(OutputVector(Dissolve.OUTPUT, "Dissolved"))

#=========================================================
12 changes: 6 additions & 6 deletions python/plugins/sextante/algs/mmqgisx/MMQGISXAlgorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,12 @@ def defineCharacteristics(self):
self.name = "Create grid"
self.group = "Vector creation tools"

self.addParameter(ParameterNumber(self.HSPACING, "Horizontal spacing", default = 10))
self.addParameter(ParameterNumber(self.VSPACING, "Vertical spacing", default = 10))
self.addParameter(ParameterNumber(self.WIDTH, "Width", default = 360))
self.addParameter(ParameterNumber(self.HEIGHT, "Height", default = 180))
self.addParameter(ParameterNumber(self.CENTERX, "Center X", default = 0))
self.addParameter(ParameterNumber(self.CENTERY, "Center Y", default = 0))
self.addParameter(ParameterNumber(self.HSPACING, "Horizontal spacing", default = 10.0))
self.addParameter(ParameterNumber(self.VSPACING, "Vertical spacing", default = 10.0))
self.addParameter(ParameterNumber(self.WIDTH, "Width", default = 360.0))
self.addParameter(ParameterNumber(self.HEIGHT, "Height", default = 180.0))
self.addParameter(ParameterNumber(self.CENTERX, "Center X", default = 0.0))
self.addParameter(ParameterNumber(self.CENTERY, "Center Y", default = 0.0))
self.gridtype_options = ["Rectangle (line)","Rectangle (polygon)","Diamond (polygon)","Hexagon (polygon)"]
self.addParameter(ParameterSelection(self.GRIDTYPE, "Grid type",
self.gridtype_options, default = 0))
Expand Down
8 changes: 8 additions & 0 deletions python/plugins/sextante/core/Sextante.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
from sextante.taudem.TauDEMAlgorithmProvider import TauDEMAlgorithmProvider
from sextante.admintools.AdminToolsAlgorithmProvider import AdminToolsAlgorithmProvider

from threading import settrace

import sys
sys.path.append("D:\eclipse\plugins\org.python.pydev_2.6.0.2012062818\pysrc")
from pydevd import *

class Sextante:

iface = None
Expand Down Expand Up @@ -268,6 +274,8 @@ def runAlgorithm(algOrName, onFinish, *args):
return
else:
i = 0

settrace()
for param in alg.parameters:
if not param.hidden:
if not param.setValue(args[i]):
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/sextante/core/SextanteConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ class SextanteConfig():
def initialize():
icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/alg.png")
SextanteConfig.settingIcons["General"] = icon
SextanteConfig.addSetting(Setting("General", SextanteConfig.USE_THREADS, "Run algorithms in a new thread (still unstable)", False))
SextanteConfig.addSetting(Setting("General", SextanteConfig.USE_THREADS, "Run algorithms in a new thread (still unstable)", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.SHOW_DEBUG_IN_DIALOG, "Show debug information and commands executed in the execution dialog's Log panel (threaded execution only)", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.KEEP_DIALOG_OPEN, "Keep dialog open after running an algorithm", False))
SextanteConfig.addSetting(Setting("General", SextanteConfig.USE_SELECTED, "Use only selected features", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.TABLE_LIKE_PARAM_PANEL, "Show table-like parameter panels", False))
SextanteConfig.addSetting(Setting("General", SextanteConfig.USE_FILENAME_AS_LAYER_NAME, "Use filename as layer name", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.SHOW_RECENT_ALGORITHMS, "Show recently executed algorithms", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.USE_CATEGORIES, "Use categories to classify algorithms, instead of providers", False))
SextanteConfig.addSetting(Setting("General", SextanteConfig.USE_CATEGORIES, "Use categories to classify algorithms, instead of providers", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.OUTPUT_FOLDER, "Output folder", SextanteUtils.tempFolder()))
SextanteConfig.addSetting(Setting("General", SextanteConfig.SHOW_CRS_DEF, "Show layer CRS definition in selection boxes", True))
SextanteConfig.addSetting(Setting("General", SextanteConfig.WARN_UNMATCHING_CRS, "Warn before executing if layer CRS's do not match", True))
Expand Down
9 changes: 9 additions & 0 deletions python/plugins/sextante/grass/GrassAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,15 @@ def getTempFilename(self):

def commandLineName(self):
return "grass:" + self.name[:self.name.find(" ")]

def checkBeforeOpeningParametersDialog(self):
msg = GrassUtils.checkGrassIsInstalled()
if msg is not None:
html = ("<p>This algorithm requires GRASS to be run."
"Unfortunately, it seems that GRASS is not installed in your system, or it is not correctly configured to be used from QGIS</p>")
html += '<p><a href= "http://docs.qgis.org/html/en/docs/user_manual/sextante/3rdParty.html">Click here</a> to know more about how to install and configure GRASS to be used with SEXTANTE</p>'
return html


def checkParameterValuesBeforeExecuting(self):
name = self.commandLineName().replace('.','_')[len('grass:'):]
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/sextante/grass/GrassUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def checkGrassIsInstalled(ignoreRegistrySettings=False):
path = GrassUtils.grassPath()
if path == "":
return "GRASS folder is not configured.\nPlease configure it before running SAGA algorithms."
cmdpath = os.path.join(path, "bin\r.out.exe")
cmdpath = os.path.join(path, "bin","r.out.gdal.exe")
if not os.path.exists(cmdpath):
return ("The specified GRASS folder does not contain a valid set of GRASS modules.\n"
+ "Please, go to the SEXTANTE settings dialog, and check that the GRASS\n"
Expand All @@ -332,7 +332,7 @@ def checkGrassIsInstalled(ignoreRegistrySettings=False):
return

try:
from sextante.core.Sextante import runalg
from sextante import runalg
result = runalg("grass:v.voronoi", points(),False,False,"270778.60198,270855.745301,4458921.97814,4458983.8488",-1,0.0001,None)
if not os.path.exists(result['output']):
return "It seems that GRASS is not correctly installed and configured in your system.\nPlease install it before running GRASS algorithms."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ v.buffer
v.buffer.column - Creates a buffer around features of given type.
Vector (v.*)
ParameterVector|input|Input vector layer|-1|False
ParameterTableField|bufcolumn|Name of column to use for buffer distances|input
ParameterTableField|bufcolumn|Name of column to use for buffer distances|input|-1|False
ParameterNumber|scale|Scaling factor for attribute column values|None|None|1.0
ParameterString|tolerance|Maximum distance between theoretical arc and polygon segments as multiple of buffer|0.01
ParameterBoolean|-s|Make outside corners straight|False
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.class.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ v.class
v.class - Classifies attribute data, e.g. for thematic mapping.
Vector (v.*)
ParameterVector|map|Input vector layer|-1|False
ParameterTableField|column|Column name or expression|map
ParameterTableField|column|Column name or expression|map|-1|False
ParameterString|where|WHERE conditions of SQL statement without 'where' keyword|
ParameterSelection|algorithm|Algorithm to use for classification|int;std;qua;equ;dis
ParameterNumber|nbclasses|Number of classes to define|2.0|None|3
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.dissolve.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ v.dissolve
v.dissolve - Dissolves boundaries between adjacent areas sharing a common category number or attribute.
Vector (v.*)
ParameterVector|input|Input vector layer|-1|False
ParameterTableField|column|Name of column used to dissolve common boundaries|input
ParameterTableField|column|Name of column used to dissolve common boundaries|input|-1|False
OutputVector|output|Dissolved layer

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Vector (v.*)
ParameterVector|from|"from" input layer|0|False
ParameterVector|to|"to" input layer|-1|False
ParameterSelection|upload|Values describing the relation between two nearest features|to_attr
ParameterTableField|column|Column where values specified by 'upload' option will be uploaded|to
ParameterTableField|to_column|Column name of nearest feature|to
ParameterTableField|column|Column where values specified by 'upload' option will be uploaded|to|-1|False
ParameterTableField|to_column|Column name of nearest feature|to|-1|False
ParameterBoolean|-a|Calculate distances to all features within the threshold|False
OutputVector|output|Output layer
2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.distance.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Vector (v.*)
ParameterVector|from|"from" input layer|0|False
ParameterVector|to|"to" input layer|-1|False
ParameterSelection|upload|Values describing the relation between two nearest features|cat;dist;to_x;to_y;to_along;to_angle
ParameterTableField|column|Column where values specified by 'upload' option will be uploaded|to
ParameterTableField|column|Column where values specified by 'upload' option will be uploaded|to|-1|False
ParameterBoolean|-a|Calculate distances to all features within the threshold|False
OutputVector|output|Output layer

2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.normal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ v.normal - Tests for normality for points.
Vector (v.*)
ParameterVector|map|point vector defining sample points|-1|False
ParameterString|tests|Lists of tests (1-15): e.g. 1,3-8,13|1-3
ParameterTableField|column|Attribute column|map
ParameterTableField|column|Attribute column|map|-1|False
ParameterBoolean|-r|Use only points in current region|True
ParameterBoolean|-l|lognormal|False
OutputHTML|html|Output
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.reclass.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ v.reclass - Changes vector category values for an existing vector map according
Vector (v.*)
ParameterVector|input|Input layer|-1|False
ParameterString|type|Feature type|point,line,boundary,centroid
ParameterTableField|column|The name of the column whose values are to be used as new categories|input
ParameterTableField|column|The name of the column whose values are to be used as new categories|input|-1|False
ParameterFile|rules|Reclass rule file|False
OutputVector|output|Reclassified layer

2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.sample.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ v.sample
v.sample - Samples a raster layer at vector point locations.
Vector (v.*)
ParameterVector|input|Vector layer defining sample points|0|False
ParameterTableField|column|Vector layer attribute column to use for comparison|input
ParameterTableField|column|Vector layer attribute column to use for comparison|input|-1|False
ParameterRaster|raster|Raster map to be sampled|False
ParameterNumber|z|Sampled raster values will be multiplied by this factor|None|None|1.0
ParameterBoolean|-b|Bilinear interpolation (default is nearest neighbor)|False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ParameterNumber|sie|Length of each spline step in the east-west direction|None|N
ParameterNumber|sin|Length of each spline step in the north-south direction|None|None|4
ParameterSelection|method|Spline interpolation algorithm|bilinear;bicubic
ParameterNumber|lambda_i|Tykhonov regularization parameter (affects smoothing)|None|None|1
ParameterTableField|column|Attribute table column with values to interpolate|input
ParameterTableField|column|Attribute table column with values to interpolate|input|-1|False
ParameterBoolean|-c|Find the best Tykhonov regularizing parameter using a "leave-one-out" cross validation method|False
ParameterBoolean|-e|Estimate point density and distance|False
OutputVector|output|Output vector layer
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.surf.idw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Vector (v.*)
ParameterVector|input|Input vector layer|0|False
ParameterNumber|npoints|Number of interpolation points|None|None|12
ParameterNumber|power|Power parameter; greater values assign greater influence to closer points|None|None|2.0
ParameterTableField|column|Attribute table column with values to interpolate|input
ParameterTableField|column|Attribute table column with values to interpolate|input|-1|False
ParameterBoolean|-n|Don't index points by raster cell|False
OutputRaster|output|Output raster
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Vector (v.*)
ParameterVector|input|Input vector layer|0|False
ParameterString|where|WHERE conditions of SQL statement without 'where' keyword|
ParameterRaster|maskmap|Name of the raster map used as mask|True
ParameterTableField|zcolumn|Name of the attribute column with values to be used for approximation|input
ParameterTableField|zcolumn|Name of the attribute column with values to be used for approximation|input|-1|False
ParameterNumber|tension|Tension parameter|None|None|40
ParameterNumber|segmax|Maximum number of points in a segment|None|None|40
ParameterNumber|npmin|Minimum number of points for approximation in a segment (>segmax)|None|None|300
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.surf.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Vector (v.*)
ParameterVector|input|Input points layer|0|False
ParameterString|where|WHERE conditions of SQL statement without 'where' keyword|
ParameterRaster|maskmap|Name of the raster map used as mask|True
ParameterTableField|zcolumn|Name of the attribute column with values to be used for approximation|input
ParameterTableField|zcolumn|Name of the attribute column with values to be used for approximation|input|-1|False
ParameterNumber|tension|Tension parameter|None|None|40
ParameterNumber|segmax|Maximum number of points in a segment|None|None|40
ParameterNumber|npmin|Minimum number of points for approximation in a segment (>segmax)|None|None|300
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ v.to.rast.attribute - Converts (rasterize) a vector layer into a raster layer.
Vector (v.*)
ParameterVector|input|Input vector layer|-1|False
ParameterSelection|use|Source of raster values|attr
ParameterTableField|column|Name of column for 'attr' parameter (data type must be numeric)|input|0
ParameterTableField|column|Name of column for 'attr' parameter (data type must be numeric)|input|0|-1|False
OutputRaster|output|Rasterized layer
2 changes: 1 addition & 1 deletion python/plugins/sextante/grass/description/v.univar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ v.univar - Calculates univariate statistics for attribute. Variance and standard
Vector (v.*)
ParameterVector|map|Name of input vector map|-1|False
ParameterString|type|Feature type|point,line,area
ParameterTableField|column|Column name|map
ParameterTableField|column|Column name|map|-1|False
ParameterString|where|WHERE conditions of SQL statement without 'where' keyword|
ParameterString|percentile|Percentile to calculate|90
ParameterBoolean|-g|Print the stats in shell script style|True
Expand Down
57 changes: 57 additions & 0 deletions python/plugins/sextante/gui/MissingDependencyDialog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
MessingDependencyDialog.py
---------------------
Date : April 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
import webbrowser

__author__ = 'Victor Olaya'
__date__ = 'April 2013'
__copyright__ = '(C) 2013, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'

from PyQt4 import QtCore, QtGui, QtWebKit
from PyQt4.QtCore import *
from PyQt4.QtGui import *

class MissingDependencyDialog(QtGui.QDialog):
def __init__(self, msg):
QtGui.QDialog.__init__(self, None, QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self.msg = "<h3>Missing dependency.This algorithm cannot be run :-( </h3>" + msg
self.setupUi()

def setupUi(self):
self.resize(500,300)
self.setWindowTitle("Missing dependency")
layout = QVBoxLayout()
webView = QtWebKit.QWebView()
webView.page().setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateAllLinks)
webView.connect(webView, SIGNAL("linkClicked(const QUrl&)"), self.linkClicked)
webView.setHtml(self.msg)
closeButton = QtGui.QPushButton()
closeButton.setText("Close")
QObject.connect(closeButton, QtCore.SIGNAL("clicked()"), self.closeButtonPressed)
layout.addWidget(webView)
layout.addWidget(closeButton)
self.setLayout(layout)
QtCore.QMetaObject.connectSlotsByName(self)

def linkClicked(self, url):
webbrowser.open(str(url.toString()))

def closeButtonPressed(self):
self.close()
6 changes: 5 additions & 1 deletion python/plugins/sextante/gui/SextanteToolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* *
***************************************************************************
"""

__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
Expand All @@ -26,6 +27,7 @@
from PyQt4.QtGui import *

import webbrowser
from sextante.gui.MissingDependencyDialog import MissingDependencyDialog
from sextante.core.GeoAlgorithm import GeoAlgorithm
from sextante.modeler.Providers import Providers
from sextante.gui.AlgorithmClassification import AlgorithmDecorator
Expand Down Expand Up @@ -115,7 +117,9 @@ def executeAlgorithm(self):
alg = Sextante.getAlgorithm(item.alg.commandLineName())
message = alg.checkBeforeOpeningParametersDialog()
if message:
QMessageBox.warning(self, self.tr("Warning"), message)
dlg = MissingDependencyDialog(message)
dlg.exec_()
#QMessageBox.warning(self, self.tr("Warning"), message)
return
alg = alg.getCopy()
dlg = alg.getCustomParametersDialog()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/modeler/models/contours.model
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PARAMETER:ParameterNumber|NUMBER_INTERVAL|Interval|0.0|None|10.0
633.0,163.0
PARAMETER:ParameterNumber|NUMBER_CELLSIZEFORINTERMEDIATELAYER|Cellsize for intermediate layer|0.0|None|10.0
411.0,84.0
PARAMETER:ParameterTableField|TABLEFIELD_FIELD|Field|VECTORLAYER_SHAPES|-1
PARAMETER:ParameterTableField|TABLEFIELD_FIELD|Field|VECTORLAYER_SHAPES|-1|False
104.0,202.0
VALUE:HARDCODEDPARAMVALUE_LINE_TYPE_0===0
VALUE:HARDCODEDPARAMVALUE_ZMAX_2===10000.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NAME:Model using field input and autoextent
GROUP:[Test models]
PARAMETER:ParameterVector|VECTORLAYER_VECTOR|vector|2|False
120.0,60.0
PARAMETER:ParameterTableField|TABLEFIELD_FIELD|field|VECTORLAYER_VECTOR|-1
PARAMETER:ParameterTableField|TABLEFIELD_FIELD|field|VECTORLAYER_VECTOR|-1|False
340.0,60.0
VALUE:HARDCODEDPARAMVALUE_LINE_TYPE_0===0
VALUE:HARDCODEDPARAMVALUE_GRID_TYPE_0===3
Expand Down
Loading