Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#3097 closed defect (fixed)

r.in.aster does not work

Reported by: venkat Owned by: grass-dev@…
Priority: normal Milestone: 7.0.6
Component: Default Version: 7.0.4
Keywords: Cc:
CPU: Unspecified Platform: MSWindows 8

Description

Running r.in.aster with Aster hdf file gives me the error shown below.

Also, the currently available Aster data in HDF format [1] contains on 14bands (band3b not included). However, r.in.aster is coded to read 15 band file.

[1] http://earthexplorer.usgs.gov/

Importing into GRASS ... Traceback (most recent call last):

File "C:\Program Files (x86)\GRASS GIS

7.0.0/scripts/r.in.aster.py", line 166, in <module>

main()

File "C:\Program Files (x86)\GRASS GIS

7.0.0/scripts/r.in.aster.py", line 127, in main

import_aster(proj, srcfile, tempfile, band)

File "C:\Program Files (x86)\GRASS GIS

7.0.0/scripts/r.in.aster.py", line 158, in import_aster

outfile = "%s.%s" % (output, band)

NameError: global name 'output' is not defined 100 - done.

Change History (6)

comment:1 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:2 by mlennert, 7 years ago

Resolution: fixed
Status: newclosed

In 69859:

r.in.aster: pass output prefix to import function (fixes #3097: r.in.aster does not work)

comment:3 by mlennert, 7 years ago

Could you please test if the version in trunk works for you ?

It fixes the 'output' name error. Concerning the issue with the absent band 3b, I haven't changed anything as this does not keep the module from functioning and importing the bands. It just output a message such as:

ERROR 4: HDF4_EOS:EOS_SWATH:AST_L1T_00306252000142255_20150409233900_101837.hdf:VNIR_Swath:ImageData3B: No such file or directory

Which I find clear enough. But we could change the code to test for the existence of the file before trying to import and emitting a warning. Just not high on my priority list as the module as is works as expected.

comment:4 by mlennert, 7 years ago

In 69933:

r.in.aster: r.in.aster: pass output prefix to import function (fixes #3097, merge from trunk r69859)

comment:5 by mlennert, 7 years ago

In 69934:

r.in.aster: r.in.aster: pass output prefix to import function (fixes #3097, merge from trunk r69859)

in reply to:  4 comment:6 by mlennert, 7 years ago

Replying to mlennert:

In 69933:

r.in.aster: r.in.aster: pass output prefix to import function (fixes #3097, merge from trunk r69859)

I got no feedback, but as the module will not function at all (AFAICT) without this fix, and the fix is non-invasive on the rest of GRASS, I applied it to g72 and g70.

Note: See TracTickets for help on using tickets.