[GRASS-SVN] r53303 - grass/trunk/lib/python

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 3 03:13:41 PDT 2012


Author: lucadelu
Date: 2012-10-03 03:13:41 -0700 (Wed, 03 Oct 2012)
New Revision: 53303

Modified:
   grass/trunk/lib/python/core.py
Log:
add option to return also extension and central point from region

Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py	2012-10-03 05:08:53 UTC (rev 53302)
+++ grass/trunk/lib/python/core.py	2012-10-03 10:13:41 UTC (rev 53303)
@@ -698,7 +698,7 @@
     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 @@
     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)



More information about the grass-commit mailing list