[GRASS-dev] [GRASS GIS] #3659: i.modis.import fails if 'datum' not defined

GRASS GIS trac at osgeo.org
Tue Sep 25 04:30:21 PDT 2018


#3659: i.modis.import fails if 'datum' not defined
-------------------------------------+-------------------------
 Reporter:  Nikos Alexandris         |      Owner:  grass-dev@…
     Type:  defect                   |     Status:  new
 Priority:  normal                   |  Milestone:
Component:  Imagery                  |    Version:  unspecified
 Keywords:  i.modis, i.modis.import  |        CPU:  Unspecified
 Platform:  Unspecified              |
-------------------------------------+-------------------------
 `i.modis.import` will fail if the 'datum' is not defined. For example, in
 a LOCATION as the following:

 {{{
 g.proj -p
 -PROJ_INFO-------------------------------------------------
 name : clark66
 ellps : clark66
 proj : ll
 no_defs : defined
 -PROJ_UNITS------------------------------------------------
 unit : degree
 units : degrees
 meters : 1.0
 }}}

 the following command will fail
 {{{
 i.modis.import input=MOD11A1.A2016174.h18v04.006.2016240225941.hdf
 }}}

 and will report

 {{{
 Traceback (most recent call last):
 File "/home/user/.grass7/addons/scripts/i.modis.import", line 607, in
 <module>
 sys.exit(main())
 File "/home/user/.grass7/addons/scripts/i.modis.import", line 559, in main
 single(options, remove, analyze, over, outfile)
 File "/home/user/.grass7/addons/scripts/i.modis.import", line 360, in
 single
 projObj = projection()
 File "/home/user/.grass7/addons/etc/i.modis/rmodislib.py", line 353, in
 __init__
 if self.proj['datum']:
 KeyError: 'datum'
 }}}

 Should the error message be improved, i.e. provide a clue to "switch" to
 another location?

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3659>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list