Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Médéric RIBREUX committed Nov 4, 2017
1 parent 65f483d commit b46e969
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions python/plugins/processing/algs/grass7/Grass7AlgorithmProvider.py
Expand Up @@ -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()
Expand Down Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion python/plugins/processing/algs/grass7/ext/r_horizon.py
Expand Up @@ -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:
Expand Down

0 comments on commit b46e969

Please sign in to comment.