mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
updates for GRASS GIS 7 support; file date updated in comment
This commit is contained in:
parent
c67e31d165
commit
0a1382a0be
@ -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 + '"'
|
||||
|
@ -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
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user