Changes between Initial Version and Version 6 of Ticket #3225


Ignore:
Timestamp:
Apr 29, 2019, 10:49:04 PM (5 years ago)
Author:
neteler
Comment:

Replying to lucadelu:

Please look and try r74438

Thanks, but now I get

r.plane output=plane dip=45 azimuth=9 easting=0:04:14.5E northing=48:52:14.5N elev=1000 type=CELL
ERROR: Input coordinates seems to be invalid

With debug output added locally, I see that "E" and "N" are the problem (which are accepted in g.region, see https://grass.osgeo.org/grass76/manuals/g.region.html#changing-extent-and-raster-resolution-using-values):

r.plane output=plane dip=45 azimuth=9 easting="00:04:14.5E" northing="48:52:14.5N" elev=1000 type=CELL
Traceback (most recent call last):
  File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-gnu/scripts/r.plane", line 134, in <module>
    main()
  File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-gnu/scripts/r.plane", line 84, in main
    print(gscript.utils.float_or_dms(options['easting']))
  File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-gnu/etc/python/grass/script/utils.py", line 45, in float_or_dms
    return sum(float(x) / 60 ** n for (n, x) in enumerate(s.split(':')))
  File "/home/mneteler/software/grass77/dist.x86_64-pc-linux-gnu/etc/python/grass/script/utils.py", line 45, in <genexpr>
    return sum(float(x) / 60 ** n for (n, x) in enumerate(s.split(':')))
ValueError: invalid literal for float(): 14.5E

# trying without "E":
r.plane output=plane dip=45 azimuth=9 easting="00:04:14.5" northing="48:52:14.5N" elev=1000 type=CELL
0.0706944444444
ERROR: Input coordinates seems to be invalid

# trying without E and N:
r.plane output=plane dip=45 azimuth=9 easting=00:04:14.5 northing=48:52:14.5 elev=1000 type=CELL
  36%
...

IMHO float_or_dms() needs an update to accept E and N.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3225

    • Property Version unspecifiedsvn-trunk
    • Property Milestone 7.0.67.6.2
  • Ticket #3225 – Description

    initial v6  
    33{{{
    44GRASS 7.2.0svn (latlong):~ >
    5 r.plane output=plane dip=45 azimuth=-9 \
     5r.plane output=plane dip=45 azimuth=9 \
    66  easting=0:04:14.5E northing=48:52:14.5N elev=1000 type=CELL
    77Traceback (most recent call last):