瀏覽代碼

add option to return also extension and central point from region

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53303 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi 12 年之前
父節點
當前提交
1676142557
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      lib/python/core.py

+ 3 - 1
lib/python/core.py

@@ -698,7 +698,7 @@ def locn_is_latlong():
     else:
 	return False
 
-def region(region3d = False):
+def region(region3d = False, complete = False):
     """!Returns the output from running "g.region -g", as a
     dictionary. Example:
 
@@ -717,6 +717,8 @@ def region(region3d = False):
     flgs = 'g'
     if region3d:
         flgs += '3'
+    if complete:
+        flgs += 'cep'
     
     s = read_command("g.region", flags = flgs)
     reg = parse_key_val(s, val_type = float)