Skip to content
Permalink
Browse files
[sextante] minor changes in algorithms
  • Loading branch information
volaya committed Jul 3, 2013
1 parent f392e57 commit 0416168216524ad1a95b4f0c19be4822d5c11883
@@ -25,6 +25,7 @@
from sextante.parameters.ParameterVector import ParameterVector
from sextante.outputs.OutputVector import OutputVector
from sextante.core.QGisLayers import QGisLayers
from sextante.parameters.ParameterCrs import ParameterCrs


class mmqgisx_delete_columns_algorithm(GeoAlgorithm):
@@ -381,6 +382,7 @@ class mmqgisx_grid_algorithm(GeoAlgorithm):
CENTERY = "CENTERY"
GRIDTYPE = "GRIDTYPE"
SAVENAME = "SAVENAME"
CRS = "CRS"

def defineCharacteristics(self):
self.name = "Create grid"
@@ -395,6 +397,7 @@ def defineCharacteristics(self):
self.gridtype_options = ["Rectangle (line)","Rectangle (polygon)","Diamond (polygon)","Hexagon (polygon)"]
self.addParameter(ParameterSelection(self.GRIDTYPE, "Grid type",
self.gridtype_options, default = 0))
self.addParameter(ParameterCrs(self.CRS, "CRS"))
self.addOutput(OutputVector(self.SAVENAME, "Output"))

#===========================================================================
@@ -413,6 +416,9 @@ def processAlgorithm(self, progress):
originy = centery - (height / 2.0)
gridtype = self.gridtype_options[self.getParameterValue(self.GRIDTYPE)]

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

if (hspacing <= 0) or (vspacing <= 0):
raise GeoAlgorithmExecutionException("Invalid grid spacing: " + unicode(hspacing) + " / " + unicode(vspacing))

@@ -117,7 +117,7 @@ qgis:fieldcalculator,USE_ORIGINAL_NAME,Vector/Table tools
qgis:fixeddistancebuffer,USE_ORIGINAL_NAME,Vector/Geometry operations
qgis:hublines,USE_ORIGINAL_NAME,Vector/Analysis
qgis:intersection,USE_ORIGINAL_NAME,Vector/Overlay
qgis:joinattributestable,USE_ORIGINAL_NAME,Vector/Selection
qgis:joinattributestable,USE_ORIGINAL_NAME,Vector/Table tools
qgis:lineintersections,USE_ORIGINAL_NAME,Vector/Lines
qgis:linestopolygons,USE_ORIGINAL_NAME,Vector/Lines
qgis:listuniquevalues,USE_ORIGINAL_NAME,Vector/Table tools
@@ -126,7 +126,6 @@ qgis:mergevectorlayers,USE_ORIGINAL_NAME,Vector/General tools
qgis:multiparttosingleparts,USE_ORIGINAL_NAME,Vector/General tools
qgis:nearestneighbouranalysis,USE_ORIGINAL_NAME,Vector/Points
qgis:pointslayerfromtable,USE_ORIGINAL_NAME,Vector/Creation
qgis:polygoncentroids,USE_ORIGINAL_NAME,Vector/Geometry operations
qgis:polygonfromlayerextent,USE_ORIGINAL_NAME,Vector/Creation
qgis:polygonstolines,USE_ORIGINAL_NAME,Vector/Polygons
qgis:randomselection,USE_ORIGINAL_NAME,Vector/Selection
@@ -197,7 +196,6 @@ saga:coordinatetransformationgrid,USE_ORIGINAL_NAME,Raster/General tools
saga:coordinatetransformationgridlist,USE_ORIGINAL_NAME,Raster/General tools
saga:coordinatetransformationshapes,USE_ORIGINAL_NAME,Vector/General tools
saga:coordinatetransformationshapeslist,USE_ORIGINAL_NAME,Vector/General tools
saga:countpointsinpolygons,USE_ORIGINAL_NAME,Vector/Polygons
saga:covereddistance,USE_ORIGINAL_NAME,Raster/Analysis
saga:creategraticule,USE_ORIGINAL_NAME,Vector/Miscellaneous
saga:croptodata,USE_ORIGINAL_NAME,Raster/General tools

This file was deleted.

0 comments on commit 0416168

Please sign in to comment.