[GRASS-dev] i.modis key error 'datum'

Nikos Alexandris nik at nikosalexandris.net
Mon Sep 24 07:30:05 PDT 2018


Apparently i.modis won't run if the current projection definition does
not have the 'datum' defined. I.e., in a location like,
```
g.proj -p
-PROJ_INFO-------------------------------------------------
name       : clark66
ellps      : clark66
proj       : ll
no_defs    : defined
-PROJ_UNITS------------------------------------------------
unit       : degree
units      : degrees
meters     : 1.0
```
it will fail:
```
i.modis.import input=MOD11A1.A2016174.h18v04.006.2016240225941.hdf
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?

Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20180924/df257884/attachment.sig>


More information about the grass-dev mailing list