Re: reading hdf4 files with rasterio

Sean Gillies

Rasterio doesn't improve the situation with subdatasets very much. You would still need to discover them via a rasterio dataset's subdatasets property. Something like

with"file.hdf4") as dataset:
    for name in dataset.subdatasets:
        with as subdataset:

On Mon, Oct 21, 2019 at 2:39 AM Amine Aboufirass <amine.aboufirass@...> wrote:
Dear All,

Is there a way to read and write hdf4 datasets using rasterio? I am working with DAAC data, for example

I found some examples of reading the data using gdal but extracting all relevant subdatasets and writing to a new GeoTiff using gdal would be a headache, I think.

Please let me know your thoughts. Thanks in advance for your help.



Sean Gillies

Join to automatically receive all group messages.