[GRASS-dev] g.parser and "#% type: double"

Nikos Alexandris nik at nikosalexandris.net
Sat Nov 15 07:19:49 PST 2014


Given the following

--%<---
#%option
#% key: sea
#% key_desc: degrees
#% type: double
#% description: Aquisition's Sun Elevation Angle
#% options: 0.0 - 90.0
#% guisection: Metadata
#% required: yes
#%end
..
import grass.script as grass
..
def main()
     ..
     sea = options['sea']
     ..

if __name__ == "__main__":
     options, flags = grass.parser()
     sys.exit(main())
--->%--

Isn't supposed that  sea  is returned as a float?  Is it really 
necessary to do

sea = float(options['sea'])

?

Grazie, Nikos


More information about the grass-dev mailing list