diff --git a/python/plugins/processing/algs/grass7/Grass7Algorithm.py b/python/plugins/processing/algs/grass7/Grass7Algorithm.py index 00bf0c80cd3..cece40e8a93 100644 --- a/python/plugins/processing/algs/grass7/Grass7Algorithm.py +++ b/python/plugins/processing/algs/grass7/Grass7Algorithm.py @@ -4,8 +4,8 @@ *************************************************************************** Grass7Algorithm.py --------------------- - Date : April 2014 - Copyright : (C) 2014 by Victor Olaya + Date : February 2015 + Copyright : (C) 2014-2015 by Victor Olaya Email : volayaf at gmail dot com *************************************************************************** * * @@ -18,8 +18,8 @@ """ __author__ = 'Victor Olaya' -__date__ = 'April 2014' -__copyright__ = '(C) 2014, Victor Olaya' +__date__ = 'February 2015' +__copyright__ = '(C) 2012-2015, Victor Olaya' # This will get replaced with a git SHA1 when you do a git archive @@ -270,6 +270,7 @@ class Grass7Algorithm(GeoAlgorithm): region = str(self.getParameterValue(self.GRASS_REGION_EXTENT_PARAMETER)) regionCoords = region.split(',') command = 'g.region' + command += ' -a' command += ' n=' + str(regionCoords[3]) command += ' s=' + str(regionCoords[2]) command += ' e=' + str(regionCoords[1]) @@ -354,11 +355,11 @@ class Grass7Algorithm(GeoAlgorithm): # Raster layer output: adjust region to layer before # exporting - commands.append('g.region rast=' + out.name + uniqueSufix) - outputCommands.append('g.region rast=' + out.name + commands.append('g.region raster=' + out.name + uniqueSufix) + outputCommands.append('g.region raster=' + out.name + uniqueSufix) if self.grassName == 'r.composite': - command = 'r.out.tiff -t --verbose' + command = 'r.out.tiff -t --verbose' # FIXME r.out.tiff deprecated, use r.out.gdal command += ' input=' command += out.name + uniqueSufix command += ' output="' + filename + '"' diff --git a/python/plugins/processing/algs/grass7/Grass7Utils.py b/python/plugins/processing/algs/grass7/Grass7Utils.py index 3a48e762810..f34de3964b6 100644 --- a/python/plugins/processing/algs/grass7/Grass7Utils.py +++ b/python/plugins/processing/algs/grass7/Grass7Utils.py @@ -4,8 +4,8 @@ *************************************************************************** GrassUtils.py --------------------- - Date : April 2014 - Copyright : (C) 2014 by Victor Olaya + Date : February 2015 + Copyright : (C) 2014-2015 by Victor Olaya Email : volayaf at gmail dot com *************************************************************************** * * @@ -18,8 +18,8 @@ """ __author__ = 'Victor Olaya' -__date__ = 'April 2014' -__copyright__ = '(C) 2014, Victor Olaya' +__date__ = 'February 2015' +__copyright__ = '(C) 2014-2015, Victor Olaya' # This will get replaced with a git SHA1 when you do a git archive @@ -207,12 +207,10 @@ class Grass7Utils: 'QGIS GRASS GIS 7 interface: temporary data processing location.\n') outfile.close() - # FIXME: in GRASS 7 the SQLite driver is default (and more powerful) Grass7Utils.writeGrass7Window(os.path.join(folder, 'PERMANENT', 'WIND')) - mkdir(os.path.join(folder, 'PERMANENT', 'dbf')) outfile = open(os.path.join(folder, 'PERMANENT', 'VAR'), 'w') - outfile.write('DB_DRIVER: dbf\n') - outfile.write('DB_DATABASE: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/\n') + outfile.write('DB_DRIVER: sqlite\n') + outfile.write('DB_DATABASE: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db\n') outfile.close() @staticmethod diff --git a/python/plugins/processing/algs/grass7/nviz7.py b/python/plugins/processing/algs/grass7/nviz7.py index aa09deab5fc..8b857ce44bd 100644 --- a/python/plugins/processing/algs/grass7/nviz7.py +++ b/python/plugins/processing/algs/grass7/nviz7.py @@ -133,7 +133,7 @@ class nviz7(GeoAlgorithm): destFilename = self.getTempFilename() command = 'v.in.ogr' command += ' min_area=-1' - command += ' dsn="' + os.path.dirname(layer) + '"' + command += ' input="' + os.path.dirname(layer) + '"' command += ' layer=' + os.path.basename(layer)[:-4] command += ' output=' + destFilename command += ' --overwrite -o'