Browse Source

make region() use integers for rows/cols

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40555 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 years ago
parent
commit
06cb907241
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lib/python/core.py

+ 4 - 1
lib/python/core.py

@@ -480,7 +480,10 @@ def region():
     @return dictionary of region values
     @return dictionary of region values
     """
     """
     s = read_command("g.region", flags='g')
     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():
 def use_temp_region():
     """!Copies the current region to a temporary region with "g.region save=",
     """!Copies the current region to a temporary region with "g.region save=",