Skip to content

Commit

Permalink
[sextante] update algorithms to changes in ParameterVector
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Aug 6, 2013
1 parent 470c9d0 commit 0c565f7
Show file tree
Hide file tree
Showing 56 changed files with 1,132 additions and 1,134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
# self.addcaddBaseParameters()
# self.name = "Import into GeoServer"
# self.group = "GeoServer management tools"
# self.addParameter(ParameterVector(self.INPUT, "Layer to import", ParameterVector.VECTOR_TYPE_ANY))
# self.addParameter(ParameterVector(self.INPUT, "Layer to import", [ParameterVector.VECTOR_TYPE_ANY]))
# self.addParameter(ParameterString(self.WORKSPACE, "Workspace"))
#===============================================================================
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ def defineCharacteristics(self):
self.addBaseParameters()
self.name = "Import vector into GeoServer"
self.group = "GeoServer management tools"
self.addParameter(ParameterVector(self.INPUT, "Layer to import", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Layer to import", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterString(self.WORKSPACE, "Workspace"))

2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/AddTableField.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def defineCharacteristics(self):
self.name = "Add field to attributes table"
self.group = "Vector table tools"

self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY, False))
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", [ParameterVector.VECTOR_TYPE_ANY], False))
self.addParameter(ParameterString(self.FIELD_NAME, "Field name"))
self.addParameter(ParameterSelection(self.FIELD_TYPE, "Field type", self.TYPE_NAMES))
self.addParameter(ParameterNumber(self.FIELD_LENGTH, "Field length", 1, 255, 10))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/AutoincrementalField.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def processAlgorithm(self, progress):
def defineCharacteristics(self):
self.name = "Add autoincremental field"
self.group = "Vector table tools"
self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addOutput(OutputVector(self.OUTPUT, "Output layer"))


Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/EquivalentNumField.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def processAlgorithm(self, progress):
def defineCharacteristics(self):
self.name = "Create equivalent numerical field"
self.group = "Vector table tools"
self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterTableField(self.FIELD, "Class field", self.INPUT))
self.addOutput(OutputVector(self.OUTPUT, "Output layer"))

2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/Explode.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ def getPolylineAsSingleSegments(self, polyline):
def defineCharacteristics(self):
self.name = "Explode lines"
self.group = "Vector geometry tools"
self.addParameter(ParameterVector(self.INPUT, "Input layer",ParameterVector.VECTOR_TYPE_LINE))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_LINE]))
self.addOutput(OutputVector(self.OUTPUT, "Output layer"))

2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/FieldPyculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class FieldsPyculator(GeoAlgorithm):
def defineCharacteristics(self):
self.name = "Advanced Python field calculator"
self.group = "Vector table tools"
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY, False))
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 length", 1, 255, 10))
Expand Down
16 changes: 8 additions & 8 deletions python/plugins/sextante/algs/FieldsCalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class FieldsCalculator(GeoAlgorithm):
def defineCharacteristics(self):
self.name = "Field calculator"
self.group = "Vector table tools"
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY, False))
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", [ParameterVector.VECTOR_TYPE_ANY], False))
self.addParameter(ParameterString(self.FIELD_NAME, "Result field name"))
self.addParameter(ParameterSelection(self.FIELD_TYPE, "Field type", self.TYPE_NAMES))
self.addParameter(ParameterNumber(self.FIELD_LENGTH, "Field length", 1, 255, 10))
Expand All @@ -81,20 +81,20 @@ def processAlgorithm(self, progress):
nFeat = provider.featureCount()
nElement = 0
features = QGisLayers.features(layer)
fieldnames = [field.name() for field in provider.fields()]

fieldnames = [field.name() for field in provider.fields()]
fieldnames.sort(key=len, reverse=False)
fieldidx = [fieldnames.index(field.name()) for field in provider.fields()]
print fieldidx
for inFeat in features:
progress.setPercentage(int((100 * nElement) / nFeat))
attrs = inFeat.attributes()
expression = formula
for idx in fieldidx:
expression = expression.replace(unicode(fields[idx].name()), unicode(attrs[idx]))
try:
expression = formula
for idx in fieldidx:
expression = expression.replace(unicode(fields[idx].name()), unicode(attrs[idx]))
try:
result = eval(expression)
except Exception:
except Exception:
result = None
nElement += 1
inGeom = inFeat.geometry()
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/sextante/algs/JoinAttributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class JoinAttributes(GeoAlgorithm):
def defineCharacteristics(self):
self.name = "Join attributes table"
self.group = "Vector general tools"
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY, False))
self.addParameter(ParameterVector(self.INPUT_LAYER_2, "Input layer 2", ParameterVector.VECTOR_TYPE_ANY, False))
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", [ParameterVector.VECTOR_TYPE_ANY], False))
self.addParameter(ParameterVector(self.INPUT_LAYER_2, "Input layer 2", [ParameterVector.VECTOR_TYPE_ANY], False))
self.addParameter(ParameterTableField(self.TABLE_FIELD, "Table field", self.INPUT_LAYER))
self.addParameter(ParameterTableField(self.TABLE_FIELD_2, "Table field 2", self.INPUT_LAYER_2))
self.addOutput(OutputVector(self.OUTPUT_LAYER, "Output layer"))
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/sextante/algs/Polygonize.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def processAlgorithm(self, progress):
def defineCharacteristics(self):
self.name = "Polygonize"
self.group = "Vector geometry tools"
self.addParameter(ParameterVector(self.INPUT, "Input layer",ParameterVector.VECTOR_TYPE_LINE))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterBoolean(self.FIELDS, "Keep table structure of line layer", False))
self.addParameter(ParameterBoolean(self.GEOMETRY, "Create geometry columns", True))
self.addOutput(OutputVector(self.OUTPUT, "Output layer"))
self.addOutput(OutputVector(self.OUTPUT, "Output layer"))
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/SaveSelectedFeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def defineCharacteristics(self):

#we add the input vector layer. It can have any kind of geometry
#It is a mandatory (not optional) one, hence the False argument
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY, False))
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", [ParameterVector.VECTOR_TYPE_ANY], False))
# we add a vector layer as output
self.addOutput(OutputVector(self.OUTPUT_LAYER, "Output layer with selected features"))

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/StatisticsByCategories.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def defineCharacteristics(self):
self.name = "Statistics by categories"
self.group = "Vector table tools"

self.addParameter(ParameterVector(self.INPUT_LAYER, "Input vector layer", ParameterVector.VECTOR_TYPE_ANY, False))
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input vector layer", [ParameterVector.VECTOR_TYPE_ANY], False))
self.addParameter(ParameterTableField(self.VALUES_FIELD_NAME, "Field to calculate statistics on",
self.INPUT_LAYER, ParameterTableField.DATA_TYPE_NUMBER))
self.addParameter(ParameterTableField(self.CATEGORIES_FIELD_NAME, "Field with categories",
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/VectorLayerHistogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def processAlgorithm(self, progress):
def defineCharacteristics(self):
self.name = "Vector layer histogram"
self.group = "Graphics"
self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterTableField(self.FIELD, "Attribute", self.INPUT,ParameterTableField.DATA_TYPE_NUMBER))
self.addParameter(ParameterNumber(self.BINS, "number of bins", 2, None, 10))
self.addOutput(OutputHTML(self.OUTPUT, "Output"))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/VectorLayerScatterplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def processAlgorithm(self, progress):
def defineCharacteristics(self):
self.name = "Vector layer scatterplot"
self.group = "Graphics"
self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterTableField(self.XFIELD, "X attribute", self.INPUT,ParameterTableField.DATA_TYPE_NUMBER))
self.addParameter(ParameterTableField(self.YFIELD, "Y attribute", self.INPUT,ParameterTableField.DATA_TYPE_NUMBER))
self.addOutput(OutputHTML(self.OUTPUT, "Output"))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/Centroids.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def defineCharacteristics(self):
self.name = "Polygon centroids"
self.group = "Vector geometry tools"

self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_POLYGON))
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", [ParameterVector.VECTOR_TYPE_POLYGON]))

self.addOutput(OutputVector(self.OUTPUT_LAYER, "Output layer"))

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/sextante/algs/ftools/Clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class Clip(GeoAlgorithm):
def defineCharacteristics(self):
self.name = "Clip"
self.group = "Vector overlay tools"
self.addParameter(ParameterVector(Clip.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(Clip.OVERLAY, "Clip layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(Clip.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterVector(Clip.OVERLAY, "Clip layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addOutput(OutputVector(Clip.OUTPUT, "Clipped"))

def processAlgorithm(self, progress):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/ConvexHull.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ConvexHull(GeoAlgorithm):
def defineCharacteristics(self):
self.name = "Convex hull"
self.group = "Vector geometry tools"
self.addParameter(ParameterVector(ConvexHull.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(ConvexHull.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterTableField(ConvexHull.FIELD, "Field (optional, only used if creating convex hulls by classes)", ConvexHull.INPUT, optional = True))
self.addParameter(ParameterSelection(ConvexHull.METHOD, "Method", ConvexHull.METHODS))
self.addOutput(OutputVector(ConvexHull.OUTPUT, "Convex hull"))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/Delaunay.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def defineCharacteristics(self):
self.name = "Delaunay triangulation"
self.group = "Vector geometry tools"

self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_POINT))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_POINT]))

self.addOutput(OutputVector(self.OUTPUT, "Delaunay triangulation"))

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/DensifyGeometries.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def defineCharacteristics(self):
self.name = "Densify geometries"
self.group = "Vector geometry tools"

self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_POLYGON,ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterNumber(self.VERTICES, "Vertices to add", 1, 10000000, 1))

self.addOutput(OutputVector(self.OUTPUT, "Densified layer"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def defineCharacteristics(self):
self.name = "Densify geometries given an interval"
self.group = "Vector geometry tools"

self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_POLYGON,ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterNumber(self.INTERVAL, "Interval between Vertices to add", 1, 10000000, 1))

self.addOutput(OutputVector(self.OUTPUT, "Densified layer"))
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/sextante/algs/ftools/Difference.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class Difference(GeoAlgorithm):
def defineCharacteristics(self):
self.name = "Difference"
self.group = "Vector overlay tools"
self.addParameter(ParameterVector(Difference.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(Difference.OVERLAY, "Difference layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(Difference.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterVector(Difference.OVERLAY, "Difference layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addOutput(OutputVector(Difference.OUTPUT, "Difference"))

def processAlgorithm(self, progress):
Expand Down
4 changes: 1 addition & 3 deletions python/plugins/sextante/algs/ftools/Dissolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ def processAlgorithm(self, progress):
def defineCharacteristics(self):
self.name = "Dissolve"
self.group = "Vector geometry tools"
self.addParameter(ParameterVector(Dissolve.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_POLYGON))
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, optional=True ))
self.addOutput(OutputVector(Dissolve.OUTPUT, "Dissolved"))

#=========================================================
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/ExportGeometryInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def defineCharacteristics(self):
self.name = "Export/Add geometry columns"
self.group = "Vector table tools"

self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterSelection(self.METHOD, "Calculate using", self.CALC_METHODS, 0))

self.addOutput(OutputVector(self.OUTPUT, "Output layer"))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/ExtentFromLayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def defineCharacteristics(self):
self.name = "Polygon from layer extent"
self.group = "Vector general tools"

self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterBoolean(self.BY_FEATURE, "Calculate extent for each feature separately", False))

self.addOutput(OutputVector(self.OUTPUT, "Output layer"))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/ExtractNodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def defineCharacteristics(self):
self.name = "Extract nodes"
self.group = "Vector geometry tools"

self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_POLYGON, ParameterVector.VECTOR_TYPE_LINE]))

self.addOutput(OutputVector(self.OUTPUT, "Output layer"))

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/FixedDistanceBuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class FixedDistanceBuffer(GeoAlgorithm):
def defineCharacteristics(self):
self.name = "Fixed distance buffer"
self.group = "Vector geometry tools"
self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterNumber(self.DISTANCE, "Distance", 0.0, default=10.0))
self.addParameter(ParameterNumber(self.SEGMENTS, "Segments", 1, default=5))
self.addParameter(ParameterBoolean(self.DISSOLVE, "Dissolve result", False))
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/sextante/algs/ftools/Intersection.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ def processAlgorithm(self, progress):
def defineCharacteristics(self):
self.name = "Intersection"
self.group = "Vector overlay tools"
self.addParameter(ParameterVector(Intersection.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(Intersection.INPUT2, "Intersect layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(Intersection.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterVector(Intersection.INPUT2, "Intersect layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addOutput(OutputVector(Intersection.OUTPUT, "Intersection"))
4 changes: 2 additions & 2 deletions python/plugins/sextante/algs/ftools/LinesIntersection.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def defineCharacteristics(self):
self.name = "Line intersections"
self.group = "Vector overlay tools"

self.addParameter(ParameterVector(self.INPUT_A, "Input layer", ParameterVector.VECTOR_TYPE_LINE))
self.addParameter(ParameterVector(self.INPUT_B, "Intersect layer", ParameterVector.VECTOR_TYPE_LINE))
self.addParameter(ParameterVector(self.INPUT_A, "Input layer", [ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterVector(self.INPUT_B, "Intersect layer", [ParameterVector.VECTOR_TYPE_LINE]))
self.addParameter(ParameterTableField(self.FIELD_A, "Input unique ID field", self.INPUT_A))
self.addParameter(ParameterTableField(self.FIELD_B, "Intersect unique ID field", self.INPUT_B))

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/LinesToPolygons.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def defineCharacteristics(self):
self.name = "Lines to polygons"
self.group = "Vector geometry tools"

self.addParameter(ParameterVector(self.INPUT, "Input layer", ParameterVector.VECTOR_TYPE_LINE))
self.addParameter(ParameterVector(self.INPUT, "Input layer", [ParameterVector.VECTOR_TYPE_LINE]))
self.addOutput(OutputVector(self.OUTPUT, "Output layer"))

def processAlgorithm(self, progress):
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/sextante/algs/ftools/MeanCoords.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def defineCharacteristics(self):
self.name = "Mean coordinate(s)"
self.group = "Vector analysis tools"

self.addParameter(ParameterVector(self.POINTS, "Input layer", ParameterVector.VECTOR_TYPE_ANY))
self.addParameter(ParameterVector(self.POINTS, "Input layer", [ParameterVector.VECTOR_TYPE_ANY]))
self.addParameter(ParameterTableField(self.WEIGHT, "Weight field", MeanCoords.POINTS, ParameterTableField.DATA_TYPE_NUMBER))
self.addParameter(ParameterTableField(self.UID, "Unique ID field", MeanCoords.POINTS, ParameterTableField.DATA_TYPE_NUMBER))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def defineCharacteristics(self):
self.name = "Nearest neighbour analysis"
self.group = "Vector analysis tools"

self.addParameter(ParameterVector(self.POINTS, "Points", ParameterVector.VECTOR_TYPE_POINT))