瀏覽代碼

grass.region(): cast values to float

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

+ 1 - 1
lib/python/grass.py

@@ -281,7 +281,7 @@ def gisenv():
 def region():
 def region():
     """Returns the output from running "g.region -g", as a dictionary."""
     """Returns the output from running "g.region -g", as a dictionary."""
     s = read_command("g.region", flags='g')
     s = read_command("g.region", flags='g')
-    return parse_key_val(s)
+    return parse_key_val(s, val_type = float)
 
 
 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=",