In our project we used Sentinel-2, Landsat 8, 7 and 5.
Landsat images are in toa or in level2 (Landsat CDR) in hdf format.
The opening of the hdf file in SNAP is operated. We see metadata, bands, masks…
The problem is the opening of bands in the image view.
We got this error :
Failed to open image view.
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Short
Bands are all in integer (int16 or uint16, uint8…)
We got this error with both Windows and linux.
Any idea about what is wrong?
Just for information, for example a Landsat CDR image folder contains :
- hdf file (ex: LC81970292014349LGN00.hdf)
- hdf.hdr file (ex: LC81970292014349LGN00.hdf.hdr)
- metadafile in xml (ex: LC81970292014349LGN00.xml) not read by SNAP
- MTL file corresponding to native MTL image file (level 1) and so it’s obsolete to read this file (LC81970292014349LGN00_MTL.txt)
bands and mask files are in img (LC81970292014349LGN00_sr_band1_hdf.img)
to make it short, Landsat data in hdf format is not yet supported.
Only GeoTiff and the old FAST format are supported.
Who is distributing Landsat in this format? Would be good to now for testing in the future if we support the format.
ok thank you for your reply.
Hdf format is provided by USGS on espa or earthexplorer websites (see http://landsat.usgs.gov/CDR_LSR.php).
Users on these sites have the choice to dowload GEOTIFF or HDF format for Landsat images.
We choose hdf format for smaller file size and easier access to metadata information…
I think, I hope, we are not alone using this format.
This is a great disservice for us.
For our project (supported by the french National Centre for Space Studies - CNES and the french National Agency for Water and Aquatic Ecosystems - ONEMA), we have to process with free sotwares all images from Landsat archives (about 15000 images , already downloaded for an old project), in addition to Sentinel-2 images.
We started to develop a multiprocessing process chain with snappy for Sentinel-2 images (very great solution ).
We would like to be able to use this chain on Landsat archives and Landsat 8 in hdf format.
So, we truly hope that Snap, in a near future, will support Landsat images in this format.
Does that make a lot of work for you?
I had a look at USGS, but haven’t seen the HDF format.
The effort to implement a reader is not neglectable. Genereally spoken, often you have a first version after one day which reads just the data, but then all the specialties have to be considered. And this can easily sum up to one to two weeks.
So you see, we can not just say we do it between two other things. We have to consider this in our development plan, find resources for it and discuss this with ESA.
However, I added a ticket to our issue tracker.