Link conda HDF4 to conda GDAL (Anaconda Python)

I have python installed via Anaconda . It works for most common things. However, I need to open the MODIS HDF4-EOS file. I tried

conda install -c https://conda.binstar.org/mutirri hdf4

conda install gdal

python -c "from osgeo import gdal; ds=gdal.Open("MOD021KM.A2014005.0910.006.2014005194151.hdf"); print type(ds)"

But I get

ERROR 4: 'MOD021KM.A2014005.0910.006.2014005194151.hdf' is not recognized as a supported file format.

<type 'NoneType'>

hey ... It seemed viable.

Does anyone know how to open a HDF4 file using Anaconda distribution for python 2.7 using GDAL? I would really appreciate your help with this.

Thanks everyone.

+3


source to share


1 answer


Until your question is the same as this https://gis.stackexchange.com/questions/110662/install-gdal-in-centos-without-root you should use the method mentioned in the accepted answer:

conda update conda
conda update anaconda
conda install -c https://conda.binstar.org/jgomezdans gdal=1.11.0

      



This version of GDAL from binstar is built with HDF4 support and will automatically install the conda HDF4 package. Remove the existing GDAL and HDF4 packages that you already installed before getting new ones.

+3


source







All Articles