lucadelu / pyModis

python library to work with MODIS data
http://www.pymodis.org/
Other
165 stars 85 forks source link

Still get no support for HDF4 #83

Closed aseemmahajan closed 7 years ago

aseemmahajan commented 7 years ago

Hi,

I'm using the command

modis_download.py -U [NAME] -P [PASSWORD] -t [Region] -p MOD13Q1.006 -f 2004-04-01 -e 2004-11-30 ../Data/terra/2004/

in pyModis but I continue to get errors that GDAL doesn't have support for HDF4 and that I've specified the directory incorrectly. I know that you've posted about the GDAL error in other cases, but having updated GDAL and PyModis, I continue to get this error (I have MacOS Sierra). Would you have any suggestions?

Thanks,

aseemmahajan commented 7 years ago

Hi, the issue above has been resolved --- I was typing in the directory incorrectly. PyModis is unfortunately still unable to connect, however :/

2017-03-27 14:15:07,767 - WARNING - WARNING: Python GDAL library not found 2017-03-27 14:15:07,831 - DEBUG - Starting new HTTP connection (1): e4ftl01.cr.usgs.gov 2017-03-27 14:15:07,935 - DEBUG - http://e4ftl01.cr.usgs.gov:80 "GET /MOLT/MOD13Q1.006 HTTP/1.1" 302 228 2017-03-27 14:15:07,940 - DEBUG - Starting new HTTPS connection (1): e4ftl01.cr.usgs.gov 2017-03-27 14:15:08,209 - DEBUG - https://e4ftl01.cr.usgs.gov:443 "GET /MOLT/MOD13Q1.006 HTTP/1.1" 301 253 2017-03-27 14:15:08,287 - DEBUG - https://e4ftl01.cr.usgs.gov:443 "GET /MOLT/MOD13Q1.006/ HTTP/1.1" 200 None

lucadelu commented 7 years ago

@aseemmahajan I cannot replicate your problem...

  l /tmp/pymodistest/
  total 167M
  drwxrwxrwt 42 root     root    52K Mar 28 10:22 ..
  -rw-r--r--  1 lucadelu femgis 167M Mar 28 10:23  MOD13Q1.A2004321.h18v04.006.2015154141435.hdf
  -rw-r--r--  1 lucadelu femgis  19K Mar 28 10:24 MOD13Q1.A2004321.h18v04.006.2015154141435.hdf.xml
  -rw-r--r--  1 lucadelu femgis   96 Mar 28 10:24 listfileMOD13Q1.006.txt
  -rw-r--r--  1 lucadelu femgis 1.6K Mar 28 10:24 modisMOD13Q1.006.log

Which pymodis, python and OS version are you using? Did you test to download an image from https://e4ftl01.cr.usgs.gov/MOLT/MOD13Q1.006 ?

aseemmahajan commented 7 years ago

Hi Luca,

I'm using Python 2.7.13, Mac OSX Sierra using PyModis 2.0.4. I was encountering the same problem on my PC, which I fixed by downloading GDAL via a Binary since it wasn't compiling in C. On my Mac, PyModis is successfully downloading some files (I'm still a beginner so have not learned how to open them yet), but when I open the "log", I get the two errors listed below.

As I mentioned, I'm just a beginner and this may very well be my own oversight, so please don't worry about spending time on this. I'll send you an email if I'm able to resolve it. (By the way, given your knowledge on this, would you have any suggestions on good resources for learning how to deal with these types of files? I'm a graduate student in government who wants to use pyModis to measure crop yields).

Thanks, Aseem

2017-03-27 16:31:16,891 - WARNING - WARNING: Python GDAL library not found 2017-03-27 16:31:20,633 - DEBUG - https://e4ftl01.cr.usgs.gov:443 "GET /MOLT/MOD13Q1.006 HTTP/1.1" 301 253

On Tue, Mar 28, 2017 at 4:28 AM, Luca Delucchi notifications@github.com wrote:

@aseemmahajan https://github.com/aseemmahajan I cannot replicate your problem...

l /tmp/pymodistest/ total 167M drwxrwxrwt 42 root root 52K Mar 28 10:22 .. -rw-r--r-- 1 lucadelu femgis 167M Mar 28 10:23 MOD13Q1.A2004321.h18v04.006.2015154141435.hdf -rw-r--r-- 1 lucadelu femgis 19K Mar 28 10:24 MOD13Q1.A2004321.h18v04.006.2015154141435.hdf.xml -rw-r--r-- 1 lucadelu femgis 96 Mar 28 10:24 listfileMOD13Q1.006.txt -rw-r--r-- 1 lucadelu femgis 1.6K Mar 28 10:24 modisMOD13Q1.006.log

Which pymodis, python and OS version are you using? Did you test to download an image from https://e4ftl01.cr.usgs.gov/ MOLT/MOD13Q1.006 ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lucadelu/pyModis/issues/83#issuecomment-289699588, or mute the thread https://github.com/notifications/unsubscribe-auth/AU9_QLYmGGA44o7XaQEfZHqJycDLmdg2ks5rqMSWgaJpZM4MpuJ- .

lucadelu commented 7 years ago

@aseemmahajan sorry for the delay, the log is not returning any error, the Warning is related to GDAL, the python GDAL library is missing, you have to install it.

About the documentation, which is your final target? do you need to analyze them or just open and read?

cljohn91 commented 7 years ago

@lucadelu I'm having a similar problem, so rather than start a new thread I'll tack onto this one. I'm using pymodis version 2.0.4, gdal version 1.11.5_2, and OSX El Capital version 10.11.6. Loading pymodis brings up the warning "GDAL installation has no support for HDF4, please update GDAL" which wasn't an issue for modis_download.py, but becomes problematic when trying to use modis_mosaic.py - it returns an error indicating that hdf is not a supported file format. In addition to this error, I get a warning that WxPython is missing - but I'm not on a Windows OS, and I don't care about the gui so my main concern is the HDF4 problem (My end goal is mosaicking, so this is a troubling roadblock). I ran brew update gdal in bash to make sure gdal is up to snuff, and everything is fine on that front... Suggestions?