ソースを参照

libpython: float_or_dms accept E,W,N,S. see https://trac.osgeo.org/grass/ticket/3225

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74485 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi 6 年 前
コミット
1864dd5a3a
1 ファイル変更2 行追加0 行削除
  1. 2 0
      lib/python/script/utils.py

+ 2 - 0
lib/python/script/utils.py

@@ -42,6 +42,8 @@ def float_or_dms(s):
 
     :return: float value
     """
+    if s[-1] in ['E', 'W', 'N', 'S']:
+        s = s[:-1]
     return sum(float(x) / 60 ** n for (n, x) in enumerate(s.split(':')))