Navigation Menu

Skip to content

Commit

Permalink
[processing] cleanup files from unused code and remove some files
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Nov 28, 2017
1 parent ee8435a commit 3d4a59b
Show file tree
Hide file tree
Showing 31 changed files with 39 additions and 1,803 deletions.
7 changes: 1 addition & 6 deletions python/plugins/processing/algs/gdal/gdalcalc.py
Expand Up @@ -26,15 +26,10 @@
__revision__ = '$Format:%H$'

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterString
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterSelection
from processing.core.outputs import OutputRaster
from processing.algs.gdal.GdalUtils import GdalUtils

from processing.tools.system import isWindows

from processing.algs.gdal.GdalUtils import GdalUtils


class gdalcalc(GdalAlgorithm):

Expand Down
Expand Up @@ -27,12 +27,6 @@

from qgis.core import QgsSettings

from processing.core.parameters import ParameterString
from processing.core.parameters import ParameterTable
from processing.core.parameters import ParameterSelection
from processing.core.parameters import ParameterBoolean
from processing.core.parameters import ParameterTableField

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.algs.gdal.GdalUtils import GdalUtils

Expand Down
9 changes: 0 additions & 9 deletions python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py
Expand Up @@ -25,15 +25,6 @@

__revision__ = '$Format:%H$'


from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterString
from processing.core.parameters import ParameterCrs
from processing.core.parameters import ParameterSelection
from processing.core.parameters import ParameterBoolean
from processing.core.parameters import ParameterExtent
from processing.core.parameters import ParameterTableField

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.algs.gdal.GdalUtils import GdalUtils

Expand Down
8 changes: 0 additions & 8 deletions python/plugins/processing/algs/gdal/rasterize.py
Expand Up @@ -30,14 +30,6 @@

from qgis.PyQt.QtGui import QIcon

from processing.core.parameters import (ParameterVector,
ParameterExtent,
ParameterTableField,
ParameterSelection,
ParameterNumber,
ParameterString)
from processing.core.outputs import OutputRaster

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.algs.gdal.GdalUtils import GdalUtils

Expand Down
4 changes: 0 additions & 4 deletions python/plugins/processing/algs/gdal/rasterize_over.py
Expand Up @@ -31,10 +31,6 @@

from qgis.PyQt.QtGui import QIcon

from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterRaster
from processing.core.parameters import ParameterTableField

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.algs.gdal.GdalUtils import GdalUtils

Expand Down
Expand Up @@ -36,7 +36,6 @@
from .Grass7Utils import Grass7Utils
from .Grass7Algorithm import Grass7Algorithm
from processing.tools.system import isWindows, isMac
#from .nviz7 import nviz7

pluginPath = os.path.normpath(os.path.join(
os.path.split(os.path.dirname(__file__))[0], os.pardir))
Expand Down Expand Up @@ -109,7 +108,6 @@ def createAlgsList(self):
except Exception as e:
QgsMessageLog.logMessage(
self.tr('Could not open GRASS GIS 7 algorithm: {0}\n{1}').format(descriptionFile, str(e)), self.tr('Processing'), QgsMessageLog.CRITICAL)
#algs.append(nviz7())
return algs

def loadAlgorithms(self):
Expand Down
196 changes: 0 additions & 196 deletions python/plugins/processing/algs/grass7/nviz7.py

This file was deleted.

3 changes: 1 addition & 2 deletions python/plugins/processing/algs/qgis/Aspect.py
Expand Up @@ -35,7 +35,6 @@
QgsProcessingParameterNumber,
QgsProcessingParameterRasterDestination)
from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm
from processing.tools.dataobjects import exportRasterLayer

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]

Expand Down Expand Up @@ -70,7 +69,7 @@ def displayName(self):
return self.tr('Aspect')

def processAlgorithm(self, parameters, context, feedback):
inputFile = exportRasterLayer(self.parameterAsRasterLayer(parameters, self.INPUT, context))
inputFile = self.parameterAsRasterLayer(parameters, self.INPUT, context).source()
zFactor = self.parameterAsDouble(parameters, self.Z_FACTOR, context)

outputFile = self.parameterAsOutputLayer(parameters, self.OUTPUT, context)
Expand Down
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/qgis/Hillshade.py
Expand Up @@ -35,7 +35,6 @@
QgsProcessingParameterNumber,
QgsProcessingParameterRasterDestination)
from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm
from processing.tools.dataobjects import exportRasterLayer

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]

Expand Down Expand Up @@ -78,7 +77,7 @@ def displayName(self):
return self.tr('Hillshade')

def processAlgorithm(self, parameters, context, feedback):
inputFile = exportRasterLayer(self.parameterAsRasterLayer(parameters, self.INPUT, context))
inputFile = self.parameterAsRasterLayer(parameters, self.INPUT, context).source()
zFactor = self.parameterAsDouble(parameters, self.Z_FACTOR, context)
azimuth = self.parameterAsDouble(parameters, self.AZIMUTH, context)
vAngle = self.parameterAsDouble(parameters, self.V_ANGLE, context)
Expand Down
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/qgis/HypsometricCurves.py
Expand Up @@ -43,7 +43,6 @@

from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm
from processing.tools import raster
from processing.tools.dataobjects import exportRasterLayer


class HypsometricCurves(QgisAlgorithm):
Expand Down Expand Up @@ -82,7 +81,7 @@ def displayName(self):
def processAlgorithm(self, parameters, context, feedback):
raster_layer = self.parameterAsRasterLayer(parameters, self.INPUT_DEM, context)
target_crs = raster_layer.crs()
rasterPath = exportRasterLayer(raster_layer)
rasterPath = raster_layer.source()

source = self.parameterAsSource(parameters, self.BOUNDARY_LAYER, context)
step = self.parameterAsDouble(parameters, self.STEP, context)
Expand Down
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/qgis/PointsFromLines.py
Expand Up @@ -41,7 +41,6 @@
QgsProcessingParameterFeatureSink)
from processing.tools import raster
from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm
from processing.tools.dataobjects import exportRasterLayer


class PointsFromLines(QgisAlgorithm):
Expand Down Expand Up @@ -74,7 +73,7 @@ def processAlgorithm(self, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT_VECTOR, context)

raster_layer = self.parameterAsRasterLayer(parameters, self.INPUT_RASTER, context)
rasterPath = exportRasterLayer(raster_layer)
rasterPath = raster_layer.source()

rasterDS = gdal.Open(rasterPath, gdal.GA_ReadOnly)
geoTransform = rasterDS.GetGeoTransform()
Expand Down
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/qgis/PointsFromPolygons.py
Expand Up @@ -42,7 +42,6 @@
from qgis.PyQt.QtCore import QVariant
from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm
from processing.tools import raster
from processing.tools.dataobjects import exportRasterLayer


class PointsFromPolygons(QgisAlgorithm):
Expand Down Expand Up @@ -74,7 +73,7 @@ def processAlgorithm(self, parameters, context, feedback):
source = self.parameterAsSource(parameters, self.INPUT_VECTOR, context)

raster_layer = self.parameterAsRasterLayer(parameters, self.INPUT_RASTER, context)
rasterPath = exportRasterLayer(raster_layer)
rasterPath = raster_layer.source()

rasterDS = gdal.Open(rasterPath, gdal.GA_ReadOnly)
geoTransform = rasterDS.GetGeoTransform()
Expand Down
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/qgis/Relief.py
Expand Up @@ -39,7 +39,6 @@
QgsRasterFileWriter,
QgsProcessingException)
from processing.algs.qgis.QgisAlgorithm import QgisAlgorithm
from processing.tools.dataobjects import exportRasterLayer

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]

Expand Down Expand Up @@ -126,7 +125,7 @@ def displayName(self):
return self.tr('Relief')

def processAlgorithm(self, parameters, context, feedback):
inputFile = exportRasterLayer(self.parameterAsRasterLayer(parameters, self.INPUT, context))
inputFile = self.parameterAsRasterLayer(parameters, self.INPUT, context).source()
zFactor = self.parameterAsDouble(parameters, self.Z_FACTOR, context)
automaticColors = self.parameterAsBool(parameters, self.AUTO_COLORS, context)
outputFile = self.parameterAsOutputLayer(parameters, self.OUTPUT, context)
Expand Down

0 comments on commit 3d4a59b

Please sign in to comment.