[GRASS-SVN] r74485 - grass/trunk/lib/python/script
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 15 14:10:40 PDT 2019
Author: lucadelu
Date: 2019-05-15 14:10:40 -0700 (Wed, 15 May 2019)
New Revision: 74485
Modified:
grass/trunk/lib/python/script/utils.py
Log:
libpython: float_or_dms accept E,W,N,S. see #3225
Modified: grass/trunk/lib/python/script/utils.py
===================================================================
--- grass/trunk/lib/python/script/utils.py 2019-05-15 21:09:54 UTC (rev 74484)
+++ grass/trunk/lib/python/script/utils.py 2019-05-15 21:10:40 UTC (rev 74485)
@@ -42,6 +42,8 @@
: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(':')))
More information about the grass-commit
mailing list