diff --git a/python/plugins/processing/algs/gdal/CMakeLists.txt b/python/plugins/processing/algs/gdal/CMakeLists.txt index 4a4515652a2..b0cb5e70380 100644 --- a/python/plugins/processing/algs/gdal/CMakeLists.txt +++ b/python/plugins/processing/algs/gdal/CMakeLists.txt @@ -1,8 +1,5 @@ FILE(GLOB PY_FILES *.py) -FILE(GLOB ICON_FILES icons/*.png) -ADD_SUBDIRECTORY(scripts) ADD_SUBDIRECTORY(pyogr) -PLUGIN_INSTALL(processing ./algs/gdal ${PY_FILES}) -PLUGIN_INSTALL(processing ./algs/gdal/icons ${ICON_FILES}) +PLUGIN_INSTALL(processing ./algs/gdal ${PY_FILES}) \ No newline at end of file diff --git a/python/plugins/processing/algs/gdal/ClipByExtent.py b/python/plugins/processing/algs/gdal/ClipByExtent.py index 54dea7db8f2..b5f00cabb59 100644 --- a/python/plugins/processing/algs/gdal/ClipByExtent.py +++ b/python/plugins/processing/algs/gdal/ClipByExtent.py @@ -29,7 +29,7 @@ import os from PyQt4 import QtGui from qgis.core import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterExtent import ParameterExtent @@ -39,7 +39,7 @@ from processing.outputs.OutputRaster import OutputRaster from processing.algs.gdal.GdalUtils import GdalUtils -class ClipByExtent(GeoAlgorithm): +class ClipByExtent(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' @@ -47,10 +47,6 @@ class ClipByExtent(GeoAlgorithm): PROJWIN = 'PROJWIN' EXTRA = 'EXTRA' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/raster-clip.png' - return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'Clip raster by extent' self.group = '[GDAL] Extraction' diff --git a/python/plugins/processing/algs/gdal/ClipByMask.py b/python/plugins/processing/algs/gdal/ClipByMask.py index dee83fe7b40..cf581f9449b 100644 --- a/python/plugins/processing/algs/gdal/ClipByMask.py +++ b/python/plugins/processing/algs/gdal/ClipByMask.py @@ -30,7 +30,7 @@ from PyQt4 import QtGui from osgeo import gdal from qgis.core import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterVector import ParameterVector @@ -42,7 +42,7 @@ from processing.outputs.OutputRaster import OutputRaster from processing.algs.gdal.GdalUtils import GdalUtils -class ClipByMask(GeoAlgorithm): +class ClipByMask(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' @@ -52,10 +52,6 @@ class ClipByMask(GeoAlgorithm): KEEP_RESOLUTION = 'KEEP_RESOLUTION' EXTRA = 'EXTRA' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/raster-clip.png' - return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'Clip raster by mask layer' self.group = '[GDAL] Extraction' diff --git a/python/plugins/processing/algs/gdal/ColorRelief.py b/python/plugins/processing/algs/gdal/ColorRelief.py index 922bb8c7032..39fea9a4c76 100644 --- a/python/plugins/processing/algs/gdal/ColorRelief.py +++ b/python/plugins/processing/algs/gdal/ColorRelief.py @@ -28,7 +28,7 @@ __revision__ = '$Format:%H$' from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterNumber import ParameterNumber @@ -39,7 +39,7 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class ColorRelief(GeoAlgorithm): +class ColorRelief(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' diff --git a/python/plugins/processing/algs/gdal/GdalAlgorithm.py b/python/plugins/processing/algs/gdal/GdalAlgorithm.py index b4761951d3e..803f46c83d4 100644 --- a/python/plugins/processing/algs/gdal/GdalAlgorithm.py +++ b/python/plugins/processing/algs/gdal/GdalAlgorithm.py @@ -28,14 +28,15 @@ __revision__ = '$Format:%H$' import os from PyQt4 import QtGui from processing.script.ScriptAlgorithm import ScriptAlgorithm +from processing.core.GeoAlgorithm import GeoAlgorithm -class GdalAlgorithm(ScriptAlgorithm): - """Just a ScriptAlgorithm that automatically takes its icon - filename for the script filename. - """ - +class GdalAlgorithm(GeoAlgorithm): + def getIcon(self): - filename = os.path.basename(self.descriptionFile[:-2] + 'png') - filepath = os.path.dirname(__file__) + '/icons/' + filename - return QtGui.QIcon(filepath) + return QtGui.QIcon(os.path.dirname(__file__) + '/../../images/gdal.png') + +class GdalScriptAlgorithm(ScriptAlgorithm): + + def getIcon(self): + return QtGui.QIcon(os.path.dirname(__file__) + '/../../images/gdal.png') diff --git a/python/plugins/processing/algs/gdal/GdalOgrAlgorithmProvider.py b/python/plugins/processing/algs/gdal/GdalOgrAlgorithmProvider.py index f37e7f1af3c..56b3c37ff7c 100644 --- a/python/plugins/processing/algs/gdal/GdalOgrAlgorithmProvider.py +++ b/python/plugins/processing/algs/gdal/GdalOgrAlgorithmProvider.py @@ -32,8 +32,7 @@ from PyQt4.QtGui import * from processing.core.AlgorithmProvider import AlgorithmProvider from processing.core.ProcessingLog import ProcessingLog from processing.script.WrongScriptException import WrongScriptException - -from GdalAlgorithm import GdalAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalScriptAlgorithm from GdalUtils import GdalUtils from nearblack import nearblack @@ -103,7 +102,7 @@ class GdalOgrAlgorithmProvider(AlgorithmProvider): return 'gdalogr' def getIcon(self): - return QIcon(os.path.dirname(__file__) + '/icons/gdalicon.png') + return QIcon(os.path.dirname(__file__) + '/../../images/gdal.png') def _loadAlgorithms(self): self.algs = self.preloadedAlgs @@ -131,7 +130,7 @@ class GdalOgrAlgorithmProvider(AlgorithmProvider): try: fullpath = os.path.join(self.scriptsFolder(), descriptionFile) - alg = GdalAlgorithm(fullpath) + alg = GdalScriptAlgorithm(fullpath) self.preloadedAlgs.append(alg) except WrongScriptException, e: ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, e.msg) diff --git a/python/plugins/processing/algs/gdal/GridAverage.py b/python/plugins/processing/algs/gdal/GridAverage.py index 79b3ab2ab81..9ca2fc068e9 100644 --- a/python/plugins/processing/algs/gdal/GridAverage.py +++ b/python/plugins/processing/algs/gdal/GridAverage.py @@ -28,7 +28,7 @@ __revision__ = '$Format:%H$' from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterVector import ParameterVector from processing.parameters.ParameterTableField import ParameterTableField from processing.parameters.ParameterNumber import ParameterNumber @@ -37,7 +37,7 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class GridAverage(GeoAlgorithm): +class GridAverage(GdalAlgorithm): INPUT = 'INPUT' Z_FIELD = 'Z_FIELD' @@ -48,10 +48,6 @@ class GridAverage(GeoAlgorithm): NODATA = 'NODATA' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'Grid (Moving average)' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/GridDataMetrics.py b/python/plugins/processing/algs/gdal/GridDataMetrics.py index 8e0de4f5733..b51890d7df4 100644 --- a/python/plugins/processing/algs/gdal/GridDataMetrics.py +++ b/python/plugins/processing/algs/gdal/GridDataMetrics.py @@ -28,7 +28,7 @@ __revision__ = '$Format:%H$' from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterVector import ParameterVector from processing.parameters.ParameterTableField import ParameterTableField from processing.parameters.ParameterSelection import ParameterSelection @@ -38,7 +38,7 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class GridDataMetrics(GeoAlgorithm): +class GridDataMetrics(GdalAlgorithm): INPUT = 'INPUT' Z_FIELD = 'Z_FIELD' @@ -53,10 +53,6 @@ class GridDataMetrics(GeoAlgorithm): DATA_METRICS = ['Minimum', 'Maximum', 'Range', 'Count', 'Average distance', 'Average distance between points'] - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'Grid (Data metrics)' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/GridInvDist.py b/python/plugins/processing/algs/gdal/GridInvDist.py index 0d487592277..48fa0575411 100644 --- a/python/plugins/processing/algs/gdal/GridInvDist.py +++ b/python/plugins/processing/algs/gdal/GridInvDist.py @@ -28,7 +28,7 @@ __revision__ = '$Format:%H$' from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterVector import ParameterVector from processing.parameters.ParameterTableField import ParameterTableField from processing.parameters.ParameterNumber import ParameterNumber @@ -37,7 +37,7 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class GridInvDist(GeoAlgorithm): +class GridInvDist(GdalAlgorithm): INPUT = 'INPUT' Z_FIELD = 'Z_FIELD' @@ -51,10 +51,6 @@ class GridInvDist(GeoAlgorithm): NODATA = 'NODATA' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'Grid (Inverse distance to a power)' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/GridNearest.py b/python/plugins/processing/algs/gdal/GridNearest.py index 3750f22e7bf..d3b7d71b225 100644 --- a/python/plugins/processing/algs/gdal/GridNearest.py +++ b/python/plugins/processing/algs/gdal/GridNearest.py @@ -28,7 +28,7 @@ __revision__ = '$Format:%H$' from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterVector import ParameterVector from processing.parameters.ParameterTableField import ParameterTableField from processing.parameters.ParameterNumber import ParameterNumber @@ -37,7 +37,7 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class GridNearest(GeoAlgorithm): +class GridNearest(GdalAlgorithm): INPUT = 'INPUT' Z_FIELD = 'Z_FIELD' @@ -47,10 +47,6 @@ class GridNearest(GeoAlgorithm): NODATA = 'NODATA' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'Grid (Nearest neighbor)' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/OgrAlgorithm.py b/python/plugins/processing/algs/gdal/OgrAlgorithm.py index fbfbedca057..e0742bc954f 100644 --- a/python/plugins/processing/algs/gdal/OgrAlgorithm.py +++ b/python/plugins/processing/algs/gdal/OgrAlgorithm.py @@ -38,11 +38,11 @@ from PyQt4.QtCore import * from PyQt4.QtGui import * from qgis.core import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.tools import dataobjects -class OgrAlgorithm(GeoAlgorithm): +class OgrAlgorithm(GdalAlgorithm): DB = 'DB' diff --git a/python/plugins/processing/algs/gdal/aspect.py b/python/plugins/processing/algs/gdal/aspect.py index 3a982853f49..981f62c281f 100644 --- a/python/plugins/processing/algs/gdal/aspect.py +++ b/python/plugins/processing/algs/gdal/aspect.py @@ -28,7 +28,7 @@ __revision__ = '$Format:%H$' from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterNumber import ParameterNumber @@ -37,7 +37,7 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class aspect(GeoAlgorithm): +class aspect(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' diff --git a/python/plugins/processing/algs/gdal/contour.py b/python/plugins/processing/algs/gdal/contour.py index cb6ce179318..1ec3fc18900 100644 --- a/python/plugins/processing/algs/gdal/contour.py +++ b/python/plugins/processing/algs/gdal/contour.py @@ -29,7 +29,7 @@ import os from PyQt4 import QtGui from qgis.core import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterNumber import ParameterNumber @@ -40,7 +40,7 @@ from processing.outputs.OutputVector import OutputVector from processing.algs.gdal.GdalUtils import GdalUtils -class contour(GeoAlgorithm): +class contour(GdalAlgorithm): INPUT_RASTER = 'INPUT_RASTER' OUTPUT_VECTOR = 'OUTPUT_VECTOR' @@ -48,10 +48,6 @@ class contour(GeoAlgorithm): FIELD_NAME = 'FIELD_NAME' EXTRA = 'EXTRA' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/contour.png' - return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'Contour' self.group = '[GDAL] Extraction' diff --git a/python/plugins/processing/algs/gdal/extractprojection.py b/python/plugins/processing/algs/gdal/extractprojection.py index 21377245a38..c366d7173d1 100644 --- a/python/plugins/processing/algs/gdal/extractprojection.py +++ b/python/plugins/processing/algs/gdal/extractprojection.py @@ -30,20 +30,16 @@ import os from osgeo import gdal, osr from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean -class ExtractProjection(GeoAlgorithm): +class ExtractProjection(GdalAlgorithm): INPUT = 'INPUT' PRJ_FILE = 'PRJ_FILE' - def getIcon(self): - return QIcon(os.path.dirname(__file__) + '/icons/projection-export.png' - ) - def defineCharacteristics(self): self.name = 'Extract projection' self.group = '[GDAL] Projections' diff --git a/python/plugins/processing/algs/gdal/fillnodata.py b/python/plugins/processing/algs/gdal/fillnodata.py index 1337f4f20df..946e10e785e 100644 --- a/python/plugins/processing/algs/gdal/fillnodata.py +++ b/python/plugins/processing/algs/gdal/fillnodata.py @@ -25,10 +25,8 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui, QtCore -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterNumber import ParameterNumber @@ -40,7 +38,7 @@ from processing.tools.system import * from processing.algs.gdal.GdalUtils import GdalUtils -class fillnodata(GeoAlgorithm): +class fillnodata(GdalAlgorithm): INPUT = 'INPUT' DISTANCE = 'DISTANCE' @@ -50,10 +48,6 @@ class fillnodata(GeoAlgorithm): NO_DEFAULT_MASK = 'NO_DEFAULT_MASK' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/fillnodata.png' - # return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'Fill nodata' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/gdal2xyz.py b/python/plugins/processing/algs/gdal/gdal2xyz.py index 4809ba2cf8e..683d5fd6f7e 100644 --- a/python/plugins/processing/algs/gdal/gdal2xyz.py +++ b/python/plugins/processing/algs/gdal/gdal2xyz.py @@ -25,11 +25,10 @@ __copyright__ = '(C) 2013, Alexander Bruy' __revision__ = '$Format:%H$' -import os from PyQt4.QtGui import * from PyQt4.QtCore import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterNumber import ParameterNumber @@ -40,15 +39,12 @@ from processing.tools.system import * from processing.algs.gdal.GdalUtils import GdalUtils -class gdal2xyz(GeoAlgorithm): +class gdal2xyz(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' OUTPUT = 'OUTPUT' - #def getIcon(self): - # return QIcon(os.path.dirname(__file__) + "/icons/gdal2xyz.png") - def defineCharacteristics(self): self.name = 'gdal2xyz' self.group = '[GDAL] Conversion' diff --git a/python/plugins/processing/algs/gdal/gdaladdo.py b/python/plugins/processing/algs/gdal/gdaladdo.py index 112b65bffe8..98d0d3a01aa 100644 --- a/python/plugins/processing/algs/gdal/gdaladdo.py +++ b/python/plugins/processing/algs/gdal/gdaladdo.py @@ -25,11 +25,7 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os - -from PyQt4 import QtGui - -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterSelection import ParameterSelection @@ -39,7 +35,7 @@ from processing.outputs.OutputRaster import OutputRaster from processing.algs.gdal.GdalUtils import GdalUtils -class gdaladdo(GeoAlgorithm): +class gdaladdo(GdalAlgorithm): INPUT = 'INPUT' LEVELS = 'LEVELS' @@ -61,10 +57,6 @@ class gdaladdo(GeoAlgorithm): FORMATS = ['Internal (if possible)', 'External (GTiff .ovr)', 'External (ERDAS Imagine .aux)'] - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/raster-overview.png' - return QtGui.QIcon(filepath) - def commandLineName(self): return "gdalogr:overviews" diff --git a/python/plugins/processing/algs/gdal/hillshade.py b/python/plugins/processing/algs/gdal/hillshade.py index b1768678169..ecfe59c6c58 100644 --- a/python/plugins/processing/algs/gdal/hillshade.py +++ b/python/plugins/processing/algs/gdal/hillshade.py @@ -28,7 +28,7 @@ __revision__ = '$Format:%H$' from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterNumber import ParameterNumber @@ -37,7 +37,7 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class hillshade(GeoAlgorithm): +class hillshade(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' @@ -49,10 +49,6 @@ class hillshade(GeoAlgorithm): ALTITUDE = 'ALTITUDE' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'Hillshade' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/icons/24-to-8-bits.png b/python/plugins/processing/algs/gdal/icons/24-to-8-bits.png deleted file mode 100644 index d623b13781f..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/24-to-8-bits.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/8-to-24-bits.png b/python/plugins/processing/algs/gdal/icons/8-to-24-bits.png deleted file mode 100644 index 9880b620404..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/8-to-24-bits.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/contour.png b/python/plugins/processing/algs/gdal/icons/contour.png deleted file mode 100644 index 6e8df91bdd7..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/contour.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/grid.png b/python/plugins/processing/algs/gdal/icons/grid.png deleted file mode 100644 index 72958fa4411..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/grid.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/merge.png b/python/plugins/processing/algs/gdal/icons/merge.png deleted file mode 100644 index 62cd95c9b83..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/merge.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/nearblack.png b/python/plugins/processing/algs/gdal/icons/nearblack.png deleted file mode 100644 index d79cb0d6f91..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/nearblack.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/polygonize.png b/python/plugins/processing/algs/gdal/icons/polygonize.png deleted file mode 100644 index 1aab12120b8..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/polygonize.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/projection-add.png b/python/plugins/processing/algs/gdal/icons/projection-add.png deleted file mode 100644 index 5955dac9cba..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/projection-add.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/projection-export.png b/python/plugins/processing/algs/gdal/icons/projection-export.png deleted file mode 100644 index aed061ce214..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/projection-export.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/proximity.png b/python/plugins/processing/algs/gdal/icons/proximity.png deleted file mode 100644 index 3c85ef6efd0..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/proximity.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/raster-clip.png b/python/plugins/processing/algs/gdal/icons/raster-clip.png deleted file mode 100644 index f26b04c22b7..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/raster-clip.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/raster-info.png b/python/plugins/processing/algs/gdal/icons/raster-info.png deleted file mode 100644 index de5cb4e4be0..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/raster-info.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/raster-overview.png b/python/plugins/processing/algs/gdal/icons/raster-overview.png deleted file mode 100644 index 909803648df..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/raster-overview.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/rasterize.png b/python/plugins/processing/algs/gdal/icons/rasterize.png deleted file mode 100644 index d04d3d72d21..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/rasterize.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/sieve.png b/python/plugins/processing/algs/gdal/icons/sieve.png deleted file mode 100644 index 6f307e2b97e..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/sieve.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/translate.png b/python/plugins/processing/algs/gdal/icons/translate.png deleted file mode 100644 index a54c2c3918d..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/translate.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/vrt.png b/python/plugins/processing/algs/gdal/icons/vrt.png deleted file mode 100644 index 62b6229c80f..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/vrt.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/icons/warp.png b/python/plugins/processing/algs/gdal/icons/warp.png deleted file mode 100644 index 21420a28e4d..00000000000 Binary files a/python/plugins/processing/algs/gdal/icons/warp.png and /dev/null differ diff --git a/python/plugins/processing/algs/gdal/information.py b/python/plugins/processing/algs/gdal/information.py index 01efe013cb2..8d1a2547c2c 100644 --- a/python/plugins/processing/algs/gdal/information.py +++ b/python/plugins/processing/algs/gdal/information.py @@ -25,26 +25,20 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.outputs.OutputHTML import OutputHTML from processing.algs.gdal.GdalUtils import GdalUtils -class information(GeoAlgorithm): +class information(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' NOGCP = 'NOGCP' NOMETADATA = 'NOMETADATA' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/raster-info.png' - return QtGui.QIcon(filepath) - def commandLineName(self): return "gdalorg:rasterinfo" diff --git a/python/plugins/processing/algs/gdal/merge.py b/python/plugins/processing/algs/gdal/merge.py index d2e4abf9ecb..0e4b9814b67 100644 --- a/python/plugins/processing/algs/gdal/merge.py +++ b/python/plugins/processing/algs/gdal/merge.py @@ -25,32 +25,22 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os - -from PyQt4 import QtGui - -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.outputs.OutputRaster import OutputRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterMultipleInput import ParameterMultipleInput - from processing.tools.system import * - from processing.algs.gdal.GdalUtils import GdalUtils -class merge(GeoAlgorithm): +class merge(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' PCT = 'PCT' SEPARATE = 'SEPARATE' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/merge.png' - return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'Merge' self.group = '[GDAL] Miscellaneous' diff --git a/python/plugins/processing/algs/gdal/nearblack.py b/python/plugins/processing/algs/gdal/nearblack.py index 523c655fa1e..c8c2267e6fd 100644 --- a/python/plugins/processing/algs/gdal/nearblack.py +++ b/python/plugins/processing/algs/gdal/nearblack.py @@ -25,29 +25,21 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui - -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterNumber import ParameterNumber from processing.parameters.ParameterBoolean import ParameterBoolean from processing.outputs.OutputRaster import OutputRaster - from processing.algs.gdal.GdalUtils import GdalUtils -class nearblack(GeoAlgorithm): +class nearblack(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' NEAR = 'NEAR' WHITE = 'WHITE' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/nearblack.png' - return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'Near black' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/ogr2ogr.py b/python/plugins/processing/algs/gdal/ogr2ogr.py index 27e91eb2eef..597fccff77f 100644 --- a/python/plugins/processing/algs/gdal/ogr2ogr.py +++ b/python/plugins/processing/algs/gdal/ogr2ogr.py @@ -25,7 +25,6 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import tempfile try: from osgeo import gdal, ogr, osr diff --git a/python/plugins/processing/algs/gdal/pct2rgb.py b/python/plugins/processing/algs/gdal/pct2rgb.py index be63861bf11..7b0f804fddc 100644 --- a/python/plugins/processing/algs/gdal/pct2rgb.py +++ b/python/plugins/processing/algs/gdal/pct2rgb.py @@ -25,29 +25,21 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.tools.system import * - from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterSelection import ParameterSelection from processing.outputs.OutputRaster import OutputRaster - from processing.algs.gdal.GdalUtils import GdalUtils -class pct2rgb(GeoAlgorithm): +class pct2rgb(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' NBAND = 'NBAND' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/8-to-24-bits.png' - return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'PCT to RGB' self.group = '[GDAL] Conversion' diff --git a/python/plugins/processing/algs/gdal/polygonize.py b/python/plugins/processing/algs/gdal/polygonize.py index 4ee75909ba8..f9678d7b2e5 100644 --- a/python/plugins/processing/algs/gdal/polygonize.py +++ b/python/plugins/processing/algs/gdal/polygonize.py @@ -25,26 +25,21 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -from PyQt4 import QtGui, QtCore -from processing.core.GeoAlgorithm import GeoAlgorithm +from PyQt4 import QtCore +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterString import ParameterString from processing.outputs.OutputVector import OutputVector from processing.tools.system import * - from processing.algs.gdal.GdalUtils import GdalUtils -class polygonize(GeoAlgorithm): +class polygonize(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' FIELD = 'FIELD' - - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/polygonize.png' - return QtGui.QIcon(filepath) - + def commandLineName(self): return "gdalogr:polygonize" diff --git a/python/plugins/processing/algs/gdal/proximity.py b/python/plugins/processing/algs/gdal/proximity.py index 1ec892549ae..9644dced22f 100644 --- a/python/plugins/processing/algs/gdal/proximity.py +++ b/python/plugins/processing/algs/gdal/proximity.py @@ -25,9 +25,7 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterString import ParameterString from processing.parameters.ParameterSelection import ParameterSelection @@ -37,7 +35,7 @@ from processing.tools.system import * from processing.algs.gdal.GdalUtils import GdalUtils -class proximity(GeoAlgorithm): +class proximity(GdalAlgorithm): INPUT = 'INPUT' VALUES = 'VALUES' @@ -49,10 +47,6 @@ class proximity(GeoAlgorithm): DISTUNITS = ['GEO', 'PIXEL'] - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/proximity.png' - return QtGui.QIcon(filepath) - def commandLineName(self): return "gdalogr:proximity" diff --git a/python/plugins/processing/algs/gdal/rasterize.py b/python/plugins/processing/algs/gdal/rasterize.py index 11e1b606544..a9b8e1b6a4b 100644 --- a/python/plugins/processing/algs/gdal/rasterize.py +++ b/python/plugins/processing/algs/gdal/rasterize.py @@ -25,10 +25,7 @@ __copyright__ = '(C) 2013, Alexander Bruy' __revision__ = '$Format:%H$' - -from PyQt4 import QtGui - -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.tools.system import * from processing.parameters.ParameterVector import ParameterVector from processing.parameters.ParameterTableField import ParameterTableField @@ -38,7 +35,7 @@ from processing.outputs.OutputRaster import OutputRaster from processing.algs.gdal.GdalUtils import GdalUtils -class rasterize(GeoAlgorithm): +class rasterize(GdalAlgorithm): INPUT = 'INPUT' FIELD = 'FIELD' @@ -47,10 +44,6 @@ class rasterize(GeoAlgorithm): HEIGHT = 'HEIGHT' OUTPUT = 'OUTPUT' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/rasterize.png' - return QtGui.QIcon(filepath) - def commandLineName(self): return "gdalogr:rasterize" diff --git a/python/plugins/processing/algs/gdal/rgb2pct.py b/python/plugins/processing/algs/gdal/rgb2pct.py index 812114b0f5c..de533682424 100644 --- a/python/plugins/processing/algs/gdal/rgb2pct.py +++ b/python/plugins/processing/algs/gdal/rgb2pct.py @@ -26,28 +26,20 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui - -from processing.core.GeoAlgorithm import GeoAlgorithm - +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterNumber import ParameterNumber from processing.outputs.OutputRaster import OutputRaster - from processing.tools.system import * from processing.algs.gdal.GdalUtils import GdalUtils -class rgb2pct(GeoAlgorithm): +class rgb2pct(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' NCOLORS = 'NCOLORS' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/24-to-8-bits.png' - return QtGui.QIcon(filepath) def defineCharacteristics(self): self.name = 'RGB to PCT' diff --git a/python/plugins/processing/algs/gdal/roughness.py b/python/plugins/processing/algs/gdal/roughness.py index 471b5d47168..977903dd0e2 100644 --- a/python/plugins/processing/algs/gdal/roughness.py +++ b/python/plugins/processing/algs/gdal/roughness.py @@ -26,9 +26,7 @@ __copyright__ = '(C) 2013, Alexander Bruy' __revision__ = '$Format:%H$' -from PyQt4.QtGui import * - -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterNumber import ParameterNumber @@ -37,17 +35,13 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class roughness(GeoAlgorithm): +class roughness(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' COMPUTE_EDGES = 'COMPUTE_EDGES' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'Roughness' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/scripts/CMakeLists.txt b/python/plugins/processing/algs/gdal/scripts/CMakeLists.txt deleted file mode 100644 index c209bb56120..00000000000 --- a/python/plugins/processing/algs/gdal/scripts/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -FILE(GLOB PY_FILES *.py) - -PLUGIN_INSTALL(processing ./gdal/algs/scripts ${PY_FILES}) diff --git a/python/plugins/processing/algs/gdal/sieve.py b/python/plugins/processing/algs/gdal/sieve.py index 75624a45ba6..2fc5da86a59 100644 --- a/python/plugins/processing/algs/gdal/sieve.py +++ b/python/plugins/processing/algs/gdal/sieve.py @@ -25,10 +25,8 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui, QtCore -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterSelection import ParameterSelection @@ -40,7 +38,7 @@ from processing.tools.system import * from processing.algs.gdal.GdalUtils import GdalUtils -class sieve(GeoAlgorithm): +class sieve(GdalAlgorithm): INPUT = 'INPUT' THRESHOLD = 'THRESHOLD' @@ -49,10 +47,6 @@ class sieve(GeoAlgorithm): PIXEL_CONNECTIONS = ['4', '8'] - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/sieve.png' - return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'Sieve' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/slope.py b/python/plugins/processing/algs/gdal/slope.py index bab84df9427..e2df4fe5d61 100644 --- a/python/plugins/processing/algs/gdal/slope.py +++ b/python/plugins/processing/algs/gdal/slope.py @@ -26,9 +26,7 @@ __copyright__ = '(C) 2013, Alexander Bruy' __revision__ = '$Format:%H$' -from PyQt4.QtGui import * - -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterNumber import ParameterNumber @@ -37,7 +35,7 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class slope(GeoAlgorithm): +class slope(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' @@ -47,10 +45,6 @@ class slope(GeoAlgorithm): SCALE = 'SCALE' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'Slope' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/tpi.py b/python/plugins/processing/algs/gdal/tpi.py index 52cb6e1fe7b..79dd1994ed2 100644 --- a/python/plugins/processing/algs/gdal/tpi.py +++ b/python/plugins/processing/algs/gdal/tpi.py @@ -26,9 +26,7 @@ __copyright__ = '(C) 2013, Alexander Bruy' __revision__ = '$Format:%H$' -from PyQt4.QtGui import * - -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterNumber import ParameterNumber @@ -37,17 +35,13 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class tpi(GeoAlgorithm): +class tpi(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' COMPUTE_EDGES = 'COMPUTE_EDGES' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'TPI (Topographic Position Index)' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/translate.py b/python/plugins/processing/algs/gdal/translate.py index f1b0e266360..742e7962894 100644 --- a/python/plugins/processing/algs/gdal/translate.py +++ b/python/plugins/processing/algs/gdal/translate.py @@ -25,10 +25,8 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui from qgis.core import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterString import ParameterString from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterNumber import ParameterNumber @@ -41,7 +39,7 @@ from processing.outputs.OutputRaster import OutputRaster from processing.algs.gdal.GdalUtils import GdalUtils -class translate(GeoAlgorithm): +class translate(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' @@ -54,10 +52,6 @@ class translate(GeoAlgorithm): SDS = 'SDS' EXTRA = 'EXTRA' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/translate.png' - return QtGui.QIcon(filepath) - def commandLineName(self): return "gdalogr:translate" diff --git a/python/plugins/processing/algs/gdal/tri.py b/python/plugins/processing/algs/gdal/tri.py index ed377aa9714..ca0d44e5033 100644 --- a/python/plugins/processing/algs/gdal/tri.py +++ b/python/plugins/processing/algs/gdal/tri.py @@ -28,7 +28,7 @@ __revision__ = '$Format:%H$' from PyQt4.QtGui import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterBoolean import ParameterBoolean from processing.parameters.ParameterNumber import ParameterNumber @@ -37,17 +37,13 @@ from processing.algs.gdal.GdalUtils import GdalUtils from processing.tools.system import * -class tri(GeoAlgorithm): +class tri(GdalAlgorithm): INPUT = 'INPUT' BAND = 'BAND' COMPUTE_EDGES = 'COMPUTE_EDGES' OUTPUT = 'OUTPUT' - #def getIcon(self): - # filepath = os.path.dirname(__file__) + '/icons/dem.png' - # return QIcon(filepath) - def defineCharacteristics(self): self.name = 'TRI (Terrain Ruggedness Index)' self.group = '[GDAL] Analysis' diff --git a/python/plugins/processing/algs/gdal/warp.py b/python/plugins/processing/algs/gdal/warp.py index ad0950cdadf..33816c90c24 100644 --- a/python/plugins/processing/algs/gdal/warp.py +++ b/python/plugins/processing/algs/gdal/warp.py @@ -25,10 +25,8 @@ __copyright__ = '(C) 2012, Victor Olaya' __revision__ = '$Format:%H$' -import os -from PyQt4 import QtGui from qgis.core import * -from processing.core.GeoAlgorithm import GeoAlgorithm +from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm from processing.parameters.ParameterRaster import ParameterRaster from processing.parameters.ParameterSelection import ParameterSelection from processing.parameters.ParameterCrs import ParameterCrs @@ -38,7 +36,7 @@ from processing.outputs.OutputRaster import OutputRaster from processing.algs.gdal.GdalUtils import GdalUtils -class warp(GeoAlgorithm): +class warp(GdalAlgorithm): INPUT = 'INPUT' OUTPUT = 'OUTPUT' @@ -49,10 +47,6 @@ class warp(GeoAlgorithm): TR = 'TR' EXTRA = 'EXTRA' - def getIcon(self): - filepath = os.path.dirname(__file__) + '/icons/self.png' - return QtGui.QIcon(filepath) - def defineCharacteristics(self): self.name = 'Warp (reproject)' self.group = '[GDAL] Projections' diff --git a/python/plugins/processing/algs/gdal/icons/gdalicon.png b/python/plugins/processing/images/gdal.png similarity index 100% rename from python/plugins/processing/algs/gdal/icons/gdalicon.png rename to python/plugins/processing/images/gdal.png