Skip to content

Commit

Permalink
[sextante] minor changes in algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Jul 3, 2013
1 parent f392e57 commit 0416168
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 6 additions & 0 deletions python/plugins/sextante/algs/mmqgisx/MMQGISXAlgorithms.py
Expand Up @@ -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):
Expand Down Expand Up @@ -381,6 +382,7 @@ class mmqgisx_grid_algorithm(GeoAlgorithm):
CENTERY = "CENTERY"
GRIDTYPE = "GRIDTYPE"
SAVENAME = "SAVENAME"
CRS = "CRS"

def defineCharacteristics(self):
self.name = "Create grid"
Expand All @@ -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"))

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

Expand Down
4 changes: 1 addition & 3 deletions python/plugins/sextante/gui/help/algclasssification.txt
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

This file was deleted.

0 comments on commit 0416168

Please sign in to comment.