[GRASS-SVN] r67037 - grass/trunk/lib/python/pygrass/modules/grid
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 7 08:52:34 PST 2015
Author: annakrat
Date: 2015-12-07 08:52:34 -0800 (Mon, 07 Dec 2015)
New Revision: 67037
Modified:
grass/trunk/lib/python/pygrass/modules/grid/grid.py
Log:
GridModule: add option to name mapsets
Modified: grass/trunk/lib/python/pygrass/modules/grid/grid.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/grid/grid.py 2015-12-07 15:01:52 UTC (rev 67036)
+++ grass/trunk/lib/python/pygrass/modules/grid/grid.py 2015-12-07 16:52:34 UTC (rev 67037)
@@ -391,6 +391,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
@@ -405,7 +407,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()
@@ -441,7 +443,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