瀏覽代碼

Add prefix option

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57650 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 11 年之前
父節點
當前提交
88bf0ea82b
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      lib/python/pygrass/modules/grid/patch.py

+ 3 - 3
lib/python/pygrass/modules/grid/patch.py

@@ -38,10 +38,10 @@ def patch_row(rast, rasts, bboxes):
 
 
 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 @@ def patch_map(raster, mapset, mset_str, bbox_list, overwrite=False,
         for rast_ in rrast:
             rast_.close()
     rast.close()
-    #import ipdb; ipdb.set_trace()
+