Jelajahi Sumber

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 tahun lalu
induk
melakukan
06cb907241
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 4 1
      lib/python/core.py

+ 4 - 1
lib/python/core.py

@@ -480,7 +480,10 @@ def region():
     @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=",