Hi,
I have been searching mailing lists for a while, and have not been
able to discover any approaches for working with AVIRIS data in GRASS.
Does anyone on the list know how to either convert or extract data as
delivered in the "free data" section [1] of the AVIRIS home page? I
have tried working with the "radiance" data, which when uncompressed
comes with several .img files-- however my copy of GDAL does not know
what to make of it. It looks like it may be possible [2] to import the
data using r.in.bin... I was not able to get this working.
1. http://aviris.jpl.nasa.gov/html/aviris.freedata.html
2. http://n2.nabble.com/AVIRIS---grass-td1864545.html
Thanks!
Dylan
I don't think you can use r.in.bin because there is no option to specify the number of bands and how those bands are interleaved. In the past I've used Multispec and Matlab to read the data but you might be able to manipulate GDAL to read it. If you can create a header file for a generic binary file that will provide GDAL with the number of rows, columns, byte order, #channels, # of bytes/sample and the interleave method then you can tell GDAL how to read it. Unfortunately I can't hit the GDAL website right now so I can't tell if any of the generic binary formats allow for all those definitions.
Cheers,
Mike
PS. Also note that none of the tiles provided in the "free" area have been geometrically rectified and some have severe distortions due to aircraft dynamics.
On 5-Jul-09, at 3:49 PM, Dylan Beaudette wrote:
Hi,
I have been searching mailing lists for a while, and have not been
able to discover any approaches for working with AVIRIS data in GRASS.
Does anyone on the list know how to either convert or extract data as
delivered in the "free data" section [1] of the AVIRIS home page? I
have tried working with the "radiance" data, which when uncompressed
comes with several .img files-- however my copy of GDAL does not know
what to make of it. It looks like it may be possible [2] to import the
data using r.in.bin... I was not able to get this working.
1. http://aviris.jpl.nasa.gov/html/aviris.freedata.html
2. http://n2.nabble.com/AVIRIS---grass-td1864545.html
Thanks!
Dylan
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
On Sun, Jul 5, 2009 at 11:49 PM, Dylan
Beaudette<dylan.beaudette@gmail.com> wrote:
Hi,
I have been searching mailing lists for a while, and have not been
able to discover any approaches for working with AVIRIS data in GRASS.
Does anyone on the list know how to either convert or extract data as
delivered in the "free data" section [1] of the AVIRIS home page? I
have tried working with the "radiance" data, which when uncompressed
comes with several .img files-- however my copy of GDAL does not know
what to make of it.
I would try to create a VRT file
http://www.gdal.org/gdal_vrttut.html
Then it might be readable with r.in.gdal. The GDAL list might be of help if
needed (please keep us posted!).
Markus
I was able to generate a ENVI style header that will allow you to read the files with GDAL. Modify as necessary and you should be able to work with the *.img files.
On 5-Jul-09, at 6:56 PM, Michael Perdue wrote:
... you might be able to manipulate GDAL to read it. If you can create a header file for a generic binary file that will provide GDAL with the number of rows, columns, byte order, #channels, # of bytes/sample and the interleave method then you can tell GDAL how to read it.
On 5-Jul-09, at 3:49 PM, Dylan Beaudette wrote:
I
have tried working with the "radiance" data, which when uncompressed
comes with several .img files-- however my copy of GDAL does not know
what to make of it. It looks like it may be possible [2] to import the
data using r.in.bin... I was not able to get this working.
Cheers,
Mike
(attachments)
Template.hdr (138 Bytes)
On Monday 06 July 2009, Michael Perdue wrote:
I was able to generate a ENVI style header that will allow you to read
the files with GDAL. Modify as necessary and you should be able to
work with the *.img files.
Fantastic. Thanks for the tips Mike. I will give this a try. For the record,
Frank W. over on the GDAL mailing list suggested the code samples below. A
script could be used to generate a single file for all 224 bands.
# make one of these for the entire set of data
# add more VRTRasterBand elements for the bands you want:
#
<VRTDataset rasterXSize="614" rasterYSize="512">
<VRTRasterBand dataType="Int16" band="1" subClass="VRTRawRasterBand">
<SourceFilename
relativetoVRT="1">f970619t01p02_r02_sc01.c.img</SourceFilename>
<ImageOffset>0</ImageOffset>
<PixelOffset>448</PixelOffset>
<LineOffset>275072</LineOffset>
<ByteOrder>MSB</ByteOrder>
</VRTRasterBand>
</VRTDataset>
# multi-band example:
<VRTDataset rasterXSize="614" rasterYSize="512">
<VRTRasterBand dataType="Int16" band="1" subClass="VRTRawRasterBand">
<SourceFilename
relativetoVRT="1">f970619t01p02_r02_sc01.c.img</SourceFilename>
<ImageOffset>0</ImageOffset>
<PixelOffset>448</PixelOffset>
<LineOffset>275072</LineOffset>
<ByteOrder>MSB</ByteOrder>
</VRTRasterBand>
<VRTRasterBand dataType="Int16" band="2" subClass="VRTRawRasterBand">
<SourceFilename
relativetoVRT="1">f970619t01p02_r02_sc01.c.img</SourceFilename>
<ImageOffset>2</ImageOffset>
<PixelOffset>448</PixelOffset>
<LineOffset>275072</LineOffset>
<ByteOrder>MSB</ByteOrder>
</VRTRasterBand>
</VRTDataset>
This works well in QGIS-- and I imagine in GRASS as well. The tricky part from
here is applying the rectification and "navigation" parameters...
Cheers,
Dylan
On 5-Jul-09, at 6:56 PM, Michael Perdue wrote:
> ... you might be able to manipulate GDAL to read it. If you can
> create a header file for a generic binary file that will provide
> GDAL with the number of rows, columns, byte order, #channels, # of
> bytes/sample and the interleave method then you can tell GDAL how to
> read it.
>
> On 5-Jul-09, at 3:49 PM, Dylan Beaudette wrote:
>> I
>> have tried working with the "radiance" data, which when uncompressed
>> comes with several .img files-- however my copy of GDAL does not know
>> what to make of it. It looks like it may be possible [2] to import
>> the
>> data using r.in.bin... I was not able to get this working.
Cheers,
Mike
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341