[GRASS-SVN] r40555 - grass/trunk/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 19 10:43:37 EST 2010
Author: glynn
Date: 2010-01-19 10:43:36 -0500 (Tue, 19 Jan 2010)
New Revision: 40555
Modified:
grass/trunk/lib/python/core.py
Log:
make region() use integers for rows/cols
Modified: grass/trunk/lib/python/core.py
===================================================================
--- grass/trunk/lib/python/core.py 2010-01-19 15:41:38 UTC (rev 40554)
+++ grass/trunk/lib/python/core.py 2010-01-19 15:43:36 UTC (rev 40555)
@@ -480,7 +480,10 @@
@return dictionary of region values
"""
s = read_command("g.region", flags='g')
- return parse_key_val(s, val_type = float)
+ reg = parse_key_val(s, val_type = float)
+ for k in ['rows', 'cols']:
+ reg[k] = int(reg[k])
+ return reg
def use_temp_region():
"""!Copies the current region to a temporary region with "g.region save=",
More information about the grass-commit
mailing list