0

This question already has an answer here:

I am trying to import the pymodis library within python and I keep getting error that

"GDAL installation has no support for HDF4, please update GDAL"

I am running the latest version of GDAL [Version: 1.11.2+dfsg-1~exp2] and tried runnign the update command too. But still the same error persists.

I am running Ubuntu 15.04 and using the terminal to run python.

enter image description here

marked as duplicate by underdark May 24 '15 at 11:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • In gis.stackexchange.com/questions/135867/… is not the answer. I don't have installed libhdf4-alt-dev and libhd4-dev in my Debian system and it has HDF4 support when I import pymodis. I think that is enough only with the packages libhd4-0 and libhd4-0-alt because I have this support. – xunilk May 24 '15 at 12:00
0

I use this on 14.04, what have you tried?

apt-get install libhdf4-dev 
apt-get install proj-bin 
apt-get install libproj-dev 
apt-get install libgdal-dev 
apt-get install gdal-bin 

This is a broad simplification, but: GDAL is geared to use what you have in your system. If I have libhdf4-dev installed and then I install GDAL, my GDAL 'comes with HDF4 support'.

  • I tried to run the command below provided in the pymodis documentation page for a start and when I tried it I got that error. "modis_download.py -f 2012-12-05 -O -t h28v05,h29v05,h28v04 /tmp" . I ran the commands you gave above too but still the error exists. – lets_try May 24 '15 at 4:28
  • Which version of GDAL are you using ? Does it come with hdf4 support ? – lets_try May 24 '15 at 4:32
  • Well, GDAL 1.11.2, released 2015/02/10 but that's kind of not the right question - GDAL is geared to use what you have in your system. If I have libhdf4-dev installed and then I install GDAL, my GDAL comes with HDF4 support. This is on Linux, but it's kind of similar on Windows if you use OSGeo4W. – mdsumner May 24 '15 at 7:34
  • In Debian 8, I have installed GDAL 1.10.1, libhd4-0, libhd4-0-alt and pymodis (without libhdf4-alt-dev and libhd4-dev) and I doesn't get any error when it is imported pymodis library in python. – xunilk May 24 '15 at 12:09
  • @mdsumner . Thanks for your answer, I tried removing gdal-din and python-gdal and then installed all the above (libhdf4-dev,proj-bin,libproj-dev,libgdal-dev) and then installed gdal-bin and python gdal again since it was mentioned above that GDAL uses what is available. BUT no luck yet – lets_try May 25 '15 at 8:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.