mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[processing] add icons for raster terrain analysis algorithms
This commit is contained in:
parent
e2f36e40d1
commit
fabc0970c5
@ -25,6 +25,10 @@ __copyright__ = '(C) 2016, Alexander Bruy'
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
|
||||
from qgis.analysis import QgsAspectFilter
|
||||
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
|
||||
from processing.core.outputs import OutputRaster
|
||||
from processing.tools import raster
|
||||
|
||||
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
|
||||
|
||||
|
||||
class Aspect(GeoAlgorithm):
|
||||
|
||||
@ -40,6 +46,9 @@ class Aspect(GeoAlgorithm):
|
||||
Z_FACTOR = 'Z_FACTOR'
|
||||
OUTPUT_LAYER = 'OUTPUT_LAYER'
|
||||
|
||||
def getIcon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name, self.i18n_name = self.trAlgorithm('Aspect')
|
||||
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
|
||||
|
@ -25,6 +25,10 @@ __copyright__ = '(C) 2016, Alexander Bruy'
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
|
||||
from qgis.analysis import QgsHillshadeFilter
|
||||
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
|
||||
from processing.core.outputs import OutputRaster
|
||||
from processing.tools import raster
|
||||
|
||||
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
|
||||
|
||||
|
||||
class Hillshade(GeoAlgorithm):
|
||||
|
||||
@ -42,6 +48,9 @@ class Hillshade(GeoAlgorithm):
|
||||
V_ANGLE = 'V_ANGLE'
|
||||
OUTPUT_LAYER = 'OUTPUT_LAYER'
|
||||
|
||||
def getIcon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name, self.i18n_name = self.trAlgorithm('Hillshade')
|
||||
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
|
||||
|
@ -25,6 +25,10 @@ __copyright__ = '(C) 2016, Alexander Bruy'
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
|
||||
from qgis.analysis import QgsRelief
|
||||
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
@ -34,6 +38,8 @@ from processing.core.outputs import OutputRaster
|
||||
from processing.core.outputs import OutputTable
|
||||
from processing.tools import raster
|
||||
|
||||
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
|
||||
|
||||
|
||||
class ReliefAuto(GeoAlgorithm):
|
||||
|
||||
@ -42,6 +48,9 @@ class ReliefAuto(GeoAlgorithm):
|
||||
OUTPUT_LAYER = 'OUTPUT_LAYER'
|
||||
FREQUENCY_DISTRIBUTION = 'FREQUENCY_DISTRIBUTION'
|
||||
|
||||
def getIcon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name, self.i18n_name = self.trAlgorithm('Relief (automatic colors)')
|
||||
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
|
||||
|
@ -25,6 +25,10 @@ __copyright__ = '(C) 2016, Alexander Bruy'
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
|
||||
from qgis.analysis import QgsRuggednessFilter
|
||||
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
|
||||
from processing.core.outputs import OutputRaster
|
||||
from processing.tools import raster
|
||||
|
||||
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
|
||||
|
||||
|
||||
class Ruggedness(GeoAlgorithm):
|
||||
|
||||
@ -40,6 +46,9 @@ class Ruggedness(GeoAlgorithm):
|
||||
Z_FACTOR = 'Z_FACTOR'
|
||||
OUTPUT_LAYER = 'OUTPUT_LAYER'
|
||||
|
||||
def getIcon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name, self.i18n_name = self.trAlgorithm('Ruggedness index')
|
||||
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
|
||||
|
@ -25,6 +25,10 @@ __copyright__ = '(C) 2016, Alexander Bruy'
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
|
||||
from qgis.analysis import QgsSlopeFilter
|
||||
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
@ -33,6 +37,8 @@ from processing.core.parameters import ParameterNumber
|
||||
from processing.core.outputs import OutputRaster
|
||||
from processing.tools import raster
|
||||
|
||||
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
|
||||
|
||||
|
||||
class Slope(GeoAlgorithm):
|
||||
|
||||
@ -40,6 +46,9 @@ class Slope(GeoAlgorithm):
|
||||
Z_FACTOR = 'Z_FACTOR'
|
||||
OUTPUT_LAYER = 'OUTPUT_LAYER'
|
||||
|
||||
def getIcon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'dem.png'))
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name, self.i18n_name = self.trAlgorithm('Slope')
|
||||
self.group, self.i18n_group = self.trAlgorithm('Raster terrain analysis')
|
||||
|
BIN
python/plugins/processing/images/dem.png
Normal file
BIN
python/plugins/processing/images/dem.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
x
Reference in New Issue
Block a user