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

#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&gt;
GRASS GIS <https://grass.osgeo.org>

#3659: i.modis.import fails if 'datum' not defined
-------------------------------+-------------------------------------
  Reporter: Nikos Alexandris | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Addons | Version: unspecified
Resolution: | Keywords: i.modis, i.modis.import
       CPU: Unspecified | Platform: Unspecified
-------------------------------+-------------------------------------
Changes (by neteler):

* component: Imagery => Addons

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3659#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3659: i.modis.import fails if 'datum' not defined
-------------------------------+-------------------------------------
  Reporter: Nikos Alexandris | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Addons | Version: unspecified
Resolution: | Keywords: i.modis, i.modis.import
       CPU: Unspecified | Platform: Unspecified
-------------------------------+-------------------------------------

Comment (by lucadelu):

Try with r73403.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3659#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3659: i.modis.import fails if 'datum' not defined
-------------------------------+-------------------------------------
  Reporter: Nikos Alexandris | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Addons | Version: unspecified
Resolution: | Keywords: i.modis, i.modis.import
       CPU: Unspecified | Platform: Unspecified
-------------------------------+-------------------------------------

Comment (by Nikos Alexandris):

Seems to be fixed!

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3659#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3659: i.modis.import fails if 'datum' not defined
-------------------------------+-------------------------------------
  Reporter: Nikos Alexandris | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone:
Component: Addons | Version: unspecified
Resolution: fixed | Keywords: i.modis, i.modis.import
       CPU: Unspecified | Platform: Unspecified
-------------------------------+-------------------------------------
Changes (by lucadelu):

* status: new => closed
* resolution: => fixed

Comment:

Reopen if needed

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3659#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>