I'm on OSX 10.9.4, using GDAL 2.0.1 from the terminal. I want to mosaic MCD12Q1 HDFs together with GDAL but my build can't even read them.
gdalinfo that file:
gdalinfo failed - unable to open 'MCD12Q1.A2001001.h20v13.051.2014287163801.hdf'.
gdalinfo --formats shows that my build supports:
HDF5 -raster- (ros): Hierarchical Data Format Release 5 HDF5Image -raster- (ro): HDF5 Dataset
So I assume these MODIS HDFs are using the HDF4 standard, which isn't listed in my formats list, and that's why GDAL has no idea what to do with them.
My QGIS Essen 2.14.0 says it's running against GDAL 1.11.4, which can't read them either; I add the HDF and it asks me to pick a raster layer in the file, but when I select one nothing appears and the error log says "Unable to load."
I saw this question about the same issue on Windows, but apparently HDF4 support is an optional flag when you install GDAL? Anyone else have this issue with MODIS HDFs on OSX? Is there a way to get HDF4 support into my GDAL builds? I installed both GDAL and QGIS using KyngChaos's installers.
EDIT: QGIS would not load these HDF4 files because their directory path had quote marks " in it. Moving them to a directory without quotes fixed this.