Skip to content

Evaluate MODIS HDF4 data for use with titiler-cmr #25

Open
@abarciauskas-bgse

Description

@abarciauskas-bgse

Earth.gov, which is an instance of VEDA, has made a request to include MODIS data. It was correctly identified that this dataset, as it is in earthdata cloud, could be a candidate for titiler-cmr. However, I am coming to the conclusion that it won't work since the files are in HDF4 and it is my understanding that any sort of virtual file system (s3fs, vsicurl, vsis3) won't work because the HDF4 library does not implement any abstraction for IO and so it must be read from a local file system using the underlying C library.

The only thing that would work would be to download entire files to read and tile from local storage, which definitely seems like a bad idea. I did test that this works at least for one file, reading using xarray (with rasterio driver), gdal or rasterio. I just want to check that the above conclusion is correct so we can advise the VEDA/earth.gov leads that we may want to take this opportunity to create a cloud-optimized version of this dataset, but that will of course take more time.

A few other notes:

  • there is a driver for working with HDF4 files: https://github.com/NCAR/pynio but it is in "maintenance mode". I don't think it will work as I think it also assumes local file system storage.
  • There is a vsipreload library that uses MODIS as an example to enable virtual file IO, however it appears there are operating system requirements (Linux glibc ONLY) so I would need to launch a virtual instance to test it out.

cc @vincentsarago @wildintellect @sharkinsspatial

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions