1

Apologies if this has been asked before. I tried to find an answer elsewhere, but couldn't find a response that resolved my issue.

I inherited some code for downloading and processing satellite data without a lot of explanation and I am required to make it work. The intention was that this code should run without me needing to do anything but run the script, but there is a bug that prevents it from working properly.

I've been able to narrow the issue to (probably) one line of code: ds = rioxarray.open_rasterio(tempFile).compute()

where tempFile represents a string for an s3 bucket. The exception message I receive about it is as follows: '/MOD13Q1_A2022193_h09v04_061_2022215010516.hdf' not recognized as a supported file format

I have almost no experience with xarray and rasterio, so I don't have a good idea of where to begin to resolve this. The file does exist at the location and rasterio can process .hdf files (I think), but if that's the case, what may be going on here? Any help is appreciated.

Thanks!

TCKnight8
  • 21
  • 1
  • do you have `hdf5` and `h5py` installed? you need to make sure you have the required drivers. You should be able to open this directly with rasterio (via [GDAL](https://gdal.org/drivers/raster/index.html)) and with [xarray](https://docs.xarray.dev/en/stable/user-guide/io.html) if it's an h5netcdf (in which case you'll need that package too). – Michael Delgado Aug 24 '22 at 22:22
  • @MichaelDelgado i believe the OPs '.hdf' file is hdf4, which the gdal library packaged with rasterio may not support? i'm struggling with this error now too. – Ian Nov 10 '22 at 16:13

0 Answers0