[GRASS-SVN] r67304 - grass/branches/releasebranch_7_0/lib/python/pygrass/modules/grid
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 21 06:27:33 PST 2015
Author: annakrat
Date: 2015-12-21 06:27:33 -0800 (Mon, 21 Dec 2015)
New Revision: 67304
Modified:
grass/branches/releasebranch_7_0/lib/python/pygrass/modules/grid/grid.py
Log:
GridModule: add option to name mapsets (merge from trunk, r67037)
Modified: grass/branches/releasebranch_7_0/lib/python/pygrass/modules/grid/grid.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/pygrass/modules/grid/grid.py 2015-12-21 14:20:43 UTC (rev 67303)
+++ grass/branches/releasebranch_7_0/lib/python/pygrass/modules/grid/grid.py 2015-12-21 14:27:33 UTC (rev 67304)
@@ -385,6 +385,8 @@
of processor available.
:param split: if True use r.tile to split all the inputs.
:type split: bool
+ :param mapset_prefix: if specified created mapsets start with this prefix
+ :type mapset_prefix: str
:param run_: if False only instantiate the object
:type run_: bool
:param args: give all the parameters to the command
@@ -399,7 +401,7 @@
"""
def __init__(self, cmd, width=None, height=None, overlap=0, processes=None,
split=False, debug=False, region=None, move=None, log=False,
- start_row=0, start_col=0, out_prefix='',
+ start_row=0, start_col=0, out_prefix='', mapset_prefix=None,
*args, **kargs):
kargs['run_'] = False
self.mset = Mapset()
@@ -435,7 +437,10 @@
self.bboxes = split_region_tiles(region=region,
width=width, height=height,
overlap=overlap)
- self.msetstr = cmd.replace('.', '') + "_%03d_%03d"
+ if mapset_prefix:
+ self.msetstr = mapset_prefix + "_%03d_%03d"
+ else:
+ self.msetstr = cmd.replace('.', '') + "_%03d_%03d"
self.inlist = None
if split:
self.split()
More information about the grass-commit
mailing list