[GRASS-SVN] r74438 - grass/trunk/scripts/r.plane
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 29 17:18:14 PDT 2019
Author: lucadelu
Date: 2019-04-29 17:18:14 -0700 (Mon, 29 Apr 2019)
New Revision: 74438
Modified:
grass/trunk/scripts/r.plane/r.plane.py
Log:
r.plane: added function float_or_dms, working on #3225
Modified: grass/trunk/scripts/r.plane/r.plane.py
===================================================================
--- grass/trunk/scripts/r.plane/r.plane.py 2019-04-29 21:21:28 UTC (rev 74437)
+++ grass/trunk/scripts/r.plane/r.plane.py 2019-04-30 00:18:14 UTC (rev 74438)
@@ -73,8 +73,15 @@
type = options['type']
dip = float(options['dip'])
az = float(options['azimuth'])
- ea = float(options['easting'])
- no = float(options['northing'])
+ try:
+ ea = float(options['easting'])
+ no = float(options['northing'])
+ except ValueError:
+ try:
+ ea = float(gscript.utils.float_or_dms(options['easting']))
+ no = float(gscript.utils.float_or_dms(options['northing']))
+ except:
+ gscript.fatal(_("Input coordinates seems to be invalid"))
el = float(options['elevation'])
# reg = gscript.region()
More information about the grass-commit
mailing list