AstroDigital / modis-ingestor

Scripts and other artifacts for MODIS data ingestion into Amazon public hosting.
MIT License
14 stars 2 forks source link

HDF to Geotiff band numbers #27

Closed perrygeo closed 7 years ago

perrygeo commented 7 years ago

When converting from hdf to geotiff, the band numbers are getting mixed up. This code assumes that the first 14 subdatasets are Bands 1-14. But the first 7 are binary quality bands, the next seven contain the reflectance.

screen shot 2017-01-31 at 2 49 25 pm

(same results can be seen from gdalinfo)

This means that all the band numbers in the modis-pds bucket also need to be fixed. For instance, s3://modis-pds/MCD43A4.006/21/07/2017004/MCD43A4.A2017004.h21v07.006.2017014061026_B08.TIF is actually the reflectance for band 1 and should be named B01.TIF

matthewhanson commented 7 years ago

Ah, excellent point, I spaced on trending then to match the actual band numbers rather than the subdataset number in the hdf. I'll rename the bands to be BXX and BXXqa. Will have it fixed by tomorrow end of day.

On Jan 31, 2017 4:58 PM, "Matthew Perry" notifications@github.com wrote:

When converting from hdf to geotiff, the band numbers are getting mixed up. This code https://github.com/AstroDigital/modis-ingestor/blob/develop/modispds/main.py#L64-L69 assumes that the first 14 subdatasets are Bands 1-14. But the first 7 are binary quality bands, the next seven contain the reflectance.

[image: screen shot 2017-01-31 at 2 49 25 pm] https://cloud.githubusercontent.com/assets/1151287/22485969/d2d28072-e7c4-11e6-9715-5f289d08de33.jpg

(same results can be seen from gdalinfo)

This means that all the band numbers in the modis-pds bucket also need to be fixed. For instance, s3://modis-pds/MCD43A4.006/21/ 07/2017004/MCD43A4.A2017004.h21v07.006.2017014061026_B08.TIF is actually the reflectance for band 1 and should be named B01.TIF

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AstroDigital/modis-ingestor/issues/27, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWexF2Og-XW8PpJ7iXFSZ5xpaMo5zZQks5rX65qgaJpZM4LzOcT .