Skip to content
Permalink
Browse files
[sextnate] minor algorithm improvements and renaming
  • Loading branch information
volaya committed Jul 18, 2013
1 parent 87e3387 commit 765ac75f78f11283229bf8709a01f79a2523a45e
@@ -18,6 +18,7 @@
"""
from sextante.parameters.ParameterTable import ParameterTable
from sextante.parameters.ParameterTableField import ParameterTableField
from sextante.parameters.ParameterCrs import ParameterCrs

__author__ = 'Victor Olaya'
__date__ = 'August 2013'
@@ -38,6 +39,7 @@ class PointsLayerFromTable(GeoAlgorithm):
XFIELD = "XFIELD"
YFIELD = "YFIELD"
OUTPUT = "OUTPUT"
TARGET_CRS = "TARGET_CRS"

def processAlgorithm(self, progress):
source = self.getParameterValue(self.INPUT)
@@ -48,6 +50,10 @@ def processAlgorithm(self, progress):
writer = output.getVectorWriter(fields, QGis.WKBPoint, self.crs)
xfieldindex = vlayer.fieldNameIndex(self.getParameterValue(self.XFIELD))
yfieldindex = vlayer.fieldNameIndex(self.getParameterValue(self.YFIELD))

crsId = self.getParameterValue(self.TARGET_CRS)
targetCrs = QgsCoordinateReferenceSystem(crsId)
self.crs = targetCrs

outFeat = QgsFeature()
nElement = 0
@@ -76,5 +82,6 @@ def defineCharacteristics(self):
self.addParameter(ParameterTable(self.INPUT, "Input layer"))
self.addParameter(ParameterTableField(self.XFIELD, "X field", self.INPUT, ParameterTableField.DATA_TYPE_ANY))
self.addParameter(ParameterTableField(self.YFIELD, "Y field", self.INPUT, ParameterTableField.DATA_TYPE_ANY))
self.addParameter(ParameterCrs(self.TARGET_CRS, "Target CRS", "EPSG:4326"))
self.addOutput(OutputVector(self.OUTPUT, "Output layer"))

@@ -127,6 +127,7 @@ qgis:nearestneighbouranalysis,USE_ORIGINAL_NAME,Vector/Points
qgis:pointslayerfromtable,USE_ORIGINAL_NAME,Vector/Creation
qgis:polygonfromlayerextent,USE_ORIGINAL_NAME,Vector/Creation
qgis:polygonstolines,USE_ORIGINAL_NAME,Vector/Polygons
qgis:polygoncentroids,USE_ORIGINAL_NAME,Vector/Polygons
qgis:randomselection,USE_ORIGINAL_NAME,Vector/Selection
qgis:randomselectionwithinsubsets,USE_ORIGINAL_NAME,Vector/Selection
qgis:rasterlayerhistogram,USE_ORIGINAL_NAME,Raster/Statistics
@@ -306,7 +307,6 @@ saga:pointstatisticsforpolygons,USE_ORIGINAL_NAME,Raster - vector/Raster - vecto
saga:pointsthinning,USE_ORIGINAL_NAME,Vector/Points
saga:polartocartesiancoordinates,USE_ORIGINAL_NAME,Domain specific/Cost analysis
saga:polygon-lineintersection,USE_ORIGINAL_NAME,Vector/Geometry operations
saga:polygoncentroids,USE_ORIGINAL_NAME,Vector/Polygons
saga:polygondissolve,USE_ORIGINAL_NAME,Vector/Polygons
saga:polygondissolvebyattribute,Polygon dissolve (by attribute),Vector/Polygons
saga:polygondissolveallpolygons,Polygon dissolve (all polygons),Vector/Polygons

0 comments on commit 765ac75

Please sign in to comment.