Skip to content
Permalink
Browse files

Fix indentation

  • Loading branch information
Médéric RIBREUX
Médéric RIBREUX committed Oct 23, 2017
1 parent 65f483d commit b46e969325afd926bc1d5269e935d38925398c13
@@ -265,7 +265,7 @@ def getDefaultCellSize(self):
layers = [l for l in self.inputLayers if isinstance(l, QgsRasterLayer)]

# Use this function to calculate cell size
cz = lambda l, cellsize: max(cellsize, (l.extent().xMaximum() - l.extent().xMinimum()) / l.width())
def cz(l, cellsize): return max(cellsize, (l.extent().xMaximum() - l.extent().xMinimum()) / l.width())

for layer in layers:
cellsize = cz(layer, cellsize)
@@ -76,7 +76,7 @@ def load(self):
ProcessingConfig.addSetting(Setting(
self.name(),
Grass7Utils.GRASS_USE_VEXTERNAL,
self.tr('For vector layers, use v.external (faster) instead of v.in.ogr'),
self.tr('For vector layers, use v.external (faster) instead of v.in.ogr'),
True))
ProcessingConfig.readSettings()
self.refreshAlgorithms()
@@ -137,19 +137,19 @@ def supportsNonFileBasedOutput(self):
GRASS7 Provider doesn't support non file based outputs
"""
return False

def supportedOutputVectorLayerExtensions(self):
# We use the same extensions than QGIS because:
# - QGIS is using OGR like GRASS
# - There are very chances than OGR version used in GRASS is
# different from QGIS OGR version.
# different from QGIS OGR version.
return QgsVectorFileWriter.supportedFormatExtensions()

def supportedOutputRasterLayerExtensions(self):
# We use the same extensions than GDAL because:
# - GRASS is also using GDAL for raster imports.
# - Chances that GRASS is compiled with another version of
# GDAL than QGIS are very limited!
# GDAL than QGIS are very limited!
return GdalUtils.getSupportedRasterExtensions()

def canBeActivated(self):
@@ -26,11 +26,12 @@
__revision__ = '$Format:%H$'
import os


def processOutputs(alg, parameters, context):
# There will be as outputs as the difference between start and end divided by steps
start = alg.parameterAsDouble(parameters, 'start', context)
end = alg.parameterAsDouble(parameters, 'end', context)
step = alg.parameterAsDouble(parameters, 'step', context)
step = alg.parameterAsDouble(parameters, 'step', context)
num = start + step
directory = alg.parameterAsString(parameters, 'output', context)
while num < end:

0 comments on commit b46e969

Please sign in to comment.
You can’t perform that action at this time.