1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
|
# -*- coding: utf-8 -*-
"""
***************************************************************************
SagaGroupNameDecorator.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'
groups = {'grid_analysis': 'Raster analysis',
'grid_calculus': 'Raster calculus',
'grid_calculus_bsl': 'Raster calculus',
'grid_discretisation': 'Raster analysis',
'grid_filter': 'Raster filter',
'grid_gridding': 'Raster creation tools',
'grid_spline': 'Raster creation tools',
'grid_tools': 'Raster tools',
'contrib_perego': 'Raster tools',
'climate_tools': 'Climate tools',
'grid_visualisation': 'Raster visualization',
'imagery_classification': 'Image analysis',
'imagery_rga': 'Image analysis',
'imagery_segmentation': 'Image analysis',
'imagery_tools': 'Image analysis',
'imagery_maxent': 'Image analysis',
'imagery_opencv': 'Image analysis',
'imagery_vigra': 'Image analysis',
'imagery_svm': 'Image analysis',
'io_esri_e00': 'I/O',
'io_gdal': 'I/O',
'io_gps': 'I/O',
'io_grid': 'I/O',
'io_grid_grib2': 'I/O',
'io_grid_image': 'I/O',
'io_odbc': 'I/O',
'io_shapes': 'I/O',
'io_shapes_dxf': 'I/O',
'io_shapes_las': 'I/O',
'io_table': 'I/O',
'pj_georeference': 'Georeferencing',
'pj_geotrans': 'Projections and Transformations',
'pj_proj4': 'Projections and Transformations',
'pointcloud_tools': 'Point clouds',
'shapes_grid': 'Vector <-> raster',
'shapes_lines': 'Vector line tools',
'shapes_points': 'Vector point tools',
'shapes_polygons': 'Vector polygon tools',
'shapes_tools': 'Vector general tools',
'shapes_transect': 'Vector general tools',
'sim_cellular_automata': 'Simulation',
'sim_ecosystems_hugget': 'Simulation',
'sim_fire_spreading': 'Simulation',
'sim_hydrology': 'Simulation',
'sim_rivflow': 'Simulation',
'sim_qm_of_esp': 'Simulation',
'statistics_grid': 'Geostatistics',
'statistics_kriging': 'Raster creation tools',
'statistics_points': 'Geostatistics',
'statistics_regression': 'Geostatistics',
'ta_channels': 'Terrain Analysis - Channels',
'ta_compound': 'Terrain Analysis - Morphometry',
'ta_hydrology': 'Terrain Analysis - Hydrology',
'ta_lighting': 'Terrain Analysis - Lighting',
'ta_morphometry': 'Terrain Analysis - Morphometry',
'ta_slope_stability': 'Terrain Analysis - Morphometry',
'ta_preprocessor': 'Terrain Analysis - Hydrology',
'ta_profiles': 'Terrain Analysis - Profiles',
'table_calculus': 'Table tools',
'table_tools': 'Table tools',
'tin_tools': 'TIN'}
def decoratedGroupName(name):
return groups.get(name, name)
algorithms = {'Add Grid Values to Points': 'Add raster values to points',
'Add Grid Values to Shapes': 'Add raster values to features',
'Change Grid Values': 'Reclassify values (simple)',
'Clip Grid with Polygon': 'Clip raster with polygon',
'K-Means Clustering for Grid': 'Cluster Analysis',
'Contour Lines from Grid': 'Contour Lines',
'Cubic Spline Approximation': 'Interpolate (Cubic spline)',
'Cut Shapes Layer': 'Cut vector Layer',
'Directional Statistics for Single Grid': 'Directional Statistics for raster layer',
'Filter Clumps': 'Remove small pixel clumps (to no-data)',
'Fire Risk Analysis': 'Fire Risk Analysis',
'Fit N Points to shape': 'Fit n points in polygon',
'Flat Detection': 'Flat Detection',
'Flow Accumulation (Flow Tracing)': 'Catchment area (Flow Tracing)',
'Flow Accumulation (Recursive)': 'Catchment area (Recursive)',
'Flow Accumulation (Top-Down)': 'Catchment area',
'GWR for Multiple Predictor Grids': 'GWR for Multiple Predictor layers',
'GWR for Single Predictor Grid': 'GWR for Single Predictor layer',
'Geographically Weighted Multiple Regression (Points/Grids)': 'Geographically Weighted Multiple Regression (Points/Raster)',
'Geographically Weighted Regression (Points/Grid)': 'Geographically Weighted Regression (Points/Raster)',
'Geometric Figures': 'Geometric Figures',
'Get Shapes Extents': 'Feature extents',
"Global Moran's I for Grids": "Global Moran's I for raster layer",
'Grid Buffer': 'Raster Buffer',
'Grid Cell Index': 'Raster Cell Index',
'Grid Difference': 'Raster Difference',
'Grid Division': 'Raster Division',
'Grid Masking': 'Raster Masking',
'Grid Normalisation': 'Raster Normalisation',
'Grid Orientation': 'Raster Orientation',
'Grid Proximity Buffer': 'Raster Proximity Buffer',
'Grid Skeletonization': 'Raster Skeletonization',
'Grid Standardisation': 'Raster Standardisation',
'Grid Statistics for Polygons': 'Raster Statistics for Polygons',
'Grid Values to Points': 'Raster Values to Points',
'Grid Values to Points (randomly)': 'Raster Values to Points (randomly)',
'Grid Volume': 'Raster Volume',
'Grids Product': 'Raster Product',
'Grids Sum': 'Rasters Sum',
'Inverse Distance Weighted': 'Inverse Distance Weighted Interpolation',
'Identity': 'Polygon identity',
'Merge Layers': 'Merge vector layers',
'Modified Quadratic Shepard': 'Modified Quadratic Shepard interpolation',
'Mosaick raster layers': 'Mosaic raster layers',
'Multilevel B-Spline Interpolation': 'Multilevel B-Spline Interpolation',
'Multilevel B-Spline Interpolation (from Grid)': 'Multilevel B-Spline Interpolation (from Raster)',
'Multiple Regression Analysis (Grid/Grids)': 'Multiple Regression Analysis (Raster/Raster)',
'Multiple Regression Analysis (Points/Grids)': 'Multiple Regression Analysis (Points/Raster)',
'Proximity Grid': 'Proximity Raster',
'QuadTree Structure to Shapes': 'QuadTree Structure to polygons',
'Radius of Variance (Grid)': 'Radius of Variance (Raster)',
'Reclassify Grid Values': 'Reclassify values',
'Shapes Buffer (Attribute distance)': 'Variable distance buffer',
'Shapes Buffer (Fixed distance)': 'fixed distance buffer',
'Shapes to Grid': 'Rasterize',
'Statistics for Grids': 'Statistics for Rasters',
'Terrain Ruggedness Index (TRI)': 'Terrain Ruggedness Index (TRI)',
'Thin Plate Spline (Global)': 'Thin Plate Spline (Global)',
'Thin Plate Spline (Local)': 'Thin Plate Spline (Local)',
'Thin Plate Spline (TIN)': 'Thin Plate Spline (TIN)',
'Threshold Buffer': 'Threshold raster buffer',
'Transform Shapes': 'Transform vector layer',
'Transpose Grids': 'Transpose Raster layers',
'Union': 'Polygon Union',
'Update': 'Polygon update',
'Upslope Area': 'Upslope Area',
'Zonal Grid Statistics': 'Zonal raster statistics'}
def decoratedAlgorithmName(name):
decorated = algorithms.get(name, name)
return decorated[0].upper() + decorated[1:].lower()
|