[GRASS-SVN] r57650 - grass/trunk/lib/python/pygrass/modules/grid

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 13 02:58:14 PDT 2013


Author: zarch
Date: 2013-09-13 02:58:14 -0700 (Fri, 13 Sep 2013)
New Revision: 57650

Modified:
   grass/trunk/lib/python/pygrass/modules/grid/patch.py
Log:
Add prefix option

Modified: grass/trunk/lib/python/pygrass/modules/grid/patch.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/grid/patch.py	2013-09-13 02:22:44 UTC (rev 57649)
+++ grass/trunk/lib/python/pygrass/modules/grid/patch.py	2013-09-13 09:58:14 UTC (rev 57650)
@@ -38,10 +38,10 @@
 
 
 def patch_map(raster, mapset, mset_str, bbox_list, overwrite=False,
-              start_row=0, start_col=0):
+              start_row=0, start_col=0, prefix=''):
     """Patch raster using a bounding box list to trim the raster."""
     # Instantiate the RasterRow input objects
-    rast = RasterRow(raster, mapset)
+    rast = RasterRow(prefix + raster, mapset)
     rtype = RasterRow(name=raster, mapset=mset_str % (0, 0))
     rtype.open('r')
     rast.open('w', mtype=rtype.mtype, overwrite=overwrite)
@@ -61,4 +61,4 @@
         for rast_ in rrast:
             rast_.close()
     rast.close()
-    #import ipdb; ipdb.set_trace()
+



More information about the grass-commit mailing list