Skip to content
Permalink
Browse files
[sextante] update algorithms to changes in ParameterVector
  • Loading branch information
alexbruy committed Aug 6, 2013
1 parent 470c9d0 commit 0c565f7c83aa06e5dcb2a46dba452abc60b96c77
Showing with 1,132 additions and 1,134 deletions.
  1. +1 −1 python/plugins/sextante/admintools/CreateMosaicDatastore.py
  2. +1 −1 python/plugins/sextante/admintools/ImportVectorIntoGeoServer.py
  3. +1 −1 python/plugins/sextante/algs/AddTableField.py
  4. +1 −1 python/plugins/sextante/algs/AutoincrementalField.py
  5. +1 −1 python/plugins/sextante/algs/EquivalentNumField.py
  6. +1 −1 python/plugins/sextante/algs/Explode.py
  7. +1 −1 python/plugins/sextante/algs/FieldPyculator.py
  8. +8 −8 python/plugins/sextante/algs/FieldsCalculator.py
  9. +2 −2 python/plugins/sextante/algs/JoinAttributes.py
  10. +2 −2 python/plugins/sextante/algs/Polygonize.py
  11. +1 −1 python/plugins/sextante/algs/SaveSelectedFeatures.py
  12. +1 −1 python/plugins/sextante/algs/StatisticsByCategories.py
  13. +1 −1 python/plugins/sextante/algs/VectorLayerHistogram.py
  14. +1 −1 python/plugins/sextante/algs/VectorLayerScatterplot.py
  15. +1 −1 python/plugins/sextante/algs/ftools/Centroids.py
  16. +2 −2 python/plugins/sextante/algs/ftools/Clip.py
  17. +1 −1 python/plugins/sextante/algs/ftools/ConvexHull.py
  18. +1 −1 python/plugins/sextante/algs/ftools/Delaunay.py
  19. +1 −1 python/plugins/sextante/algs/ftools/DensifyGeometries.py
  20. +1 −1 python/plugins/sextante/algs/ftools/DensifyGeometriesInterval.py
  21. +2 −2 python/plugins/sextante/algs/ftools/Difference.py
  22. +1 −3 python/plugins/sextante/algs/ftools/Dissolve.py
  23. +1 −1 python/plugins/sextante/algs/ftools/ExportGeometryInfo.py
  24. +1 −1 python/plugins/sextante/algs/ftools/ExtentFromLayer.py
  25. +1 −1 python/plugins/sextante/algs/ftools/ExtractNodes.py
  26. +1 −1 python/plugins/sextante/algs/ftools/FixedDistanceBuffer.py
  27. +2 −2 python/plugins/sextante/algs/ftools/Intersection.py
  28. +2 −2 python/plugins/sextante/algs/ftools/LinesIntersection.py
  29. +1 −1 python/plugins/sextante/algs/ftools/LinesToPolygons.py
  30. +1 −1 python/plugins/sextante/algs/ftools/MeanCoords.py
  31. +1 −1 python/plugins/sextante/algs/ftools/NearestNeighbourAnalysis.py
  32. +1 −1 python/plugins/sextante/algs/ftools/PointDistance.py
  33. +2 −2 python/plugins/sextante/algs/ftools/PointsInPolygon.py
  34. +2 −2 python/plugins/sextante/algs/ftools/PointsInPolygonUnique.py
  35. +2 −2 python/plugins/sextante/algs/ftools/PointsInPolygonWeighted.py
  36. +1 −1 python/plugins/sextante/algs/ftools/PolygonsToLines.py
  37. +1 −1 python/plugins/sextante/algs/ftools/RandomSelection.py
  38. +1 −1 python/plugins/sextante/algs/ftools/RandomSelectionWithinSubsets.py
  39. +1 −1 python/plugins/sextante/algs/ftools/ReprojectLayer.py
  40. +2 −2 python/plugins/sextante/algs/ftools/SelectByLocation.py
  41. +1 −1 python/plugins/sextante/algs/ftools/SimplifyGeometries.py
  42. +2 −2 python/plugins/sextante/algs/ftools/SumLines.py
  43. +2 −2 python/plugins/sextante/algs/ftools/Union.py
  44. +1 −1 python/plugins/sextante/algs/ftools/UniqueValues.py
  45. +1 −1 python/plugins/sextante/algs/ftools/VariableDistanceBuffer.py
  46. +1 −1 python/plugins/sextante/algs/ftools/VoronoiPolygons.py
  47. +1,058 −1,058 python/plugins/sextante/algs/mmqgisx/MMQGISXAlgorithms.py
  48. +1 −1 python/plugins/sextante/exampleprovider/ExampleAlgorithm.py
  49. +1 −1 python/plugins/sextante/gdal/ogr2ogr.py
  50. +1 −1 python/plugins/sextante/gdal/ogrinfo.py
  51. +1 −1 python/plugins/sextante/gdal/ogrsql.py
  52. +1 −1 python/plugins/sextante/lidar/lastools/lasclip.py
  53. +1 −1 python/plugins/sextante/taudem/dinftranslimaccum.py
  54. +1 −1 python/plugins/sextante/taudem/dinftranslimaccum2.py
  55. +1 −1 python/plugins/sextante/taudem/dropanalysis.py
  56. +1 −1 python/plugins/sextante/taudem/gridnet.py
@@ -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"))
#===============================================================================
@@ -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"))

@@ -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))
@@ -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"))


@@ -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"))

@@ -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"))

@@ -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))
@@ -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))
@@ -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()
@@ -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"))
@@ -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"))
@@ -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"))

@@ -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",
@@ -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"))
@@ -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"))
@@ -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"))

@@ -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):
@@ -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"))
@@ -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"))

@@ -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"))
@@ -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"))
@@ -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):
@@ -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"))

#=========================================================
@@ -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"))
@@ -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"))
@@ -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"))

@@ -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))
@@ -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"))
@@ -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))

@@ -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):
@@ -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))

@@ -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))
self.addParameter(ParameterVector(self.POINTS, "Points", [ParameterVector.VECTOR_TYPE_POINT]))

self.addOutput(OutputHTML(self.OUTPUT, "Result"))

Loading

0 comments on commit 0c565f7

Please sign in to comment.