[R-sig-Geo] wget error While downloading a MODIS Tile

Matteo Mattiuzzi matteo.mattiuzzi at boku.ac.at
Mon Dec 10 14:48:43 CET 2012


Dear Wesley,


You may give a try to the MODIS package. Currently it has build problems in R-Forge but you can also install ZIP or TAR from here:
https://www.dropbox.com/sh/18t0rgcm6bga7xt/-4k_Xwojxr/MODIS


If you just want to download the data you are fine with that. If you want to also process the data and you use Windows, you need a GDAL with HDF4 driver (FWTools or OSgeos4W).
http://trac.osgeo.org/osgeo4w/ (http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe)
or 
http://fwtools.maptools.org/ (http://home.gdal.org/fwtools/FWTools247.exe)


If basic settings (like the location of the local HDF archieve) are fine see ?MODISoptions, you can proceed directly to the processing see: ?runGdal().


Matteo
  

>>> Wesley Roberts  12/10/12 2:30 PM >>>
Dear R-Sig-Geo,


I am currently using a script I downloaded from the
spatial-analyst.netwebsite to download and mosaic a couple of MODIS
Tiles for my study area (
http://spatial-analyst.net/wiki/index.php?title=Download_and_resampling_of_MODIS_images
)

I have managed to get as far as the first wget request and am receiving the
following error.

> download.file(paste(MOD13A3, dates$dirname[[i]], "/", BLOCK1,sep=""),
destfile=paste(getwd(), "/", BLOCK1, sep=""), mode='wb', method='wget',
quiet=T, cacheOK=FALSE)
cygwin warning:
  MS-DOS style path detected:
C:/Users/biocarbon/Documents/MOD13A3.A2001091.h20v09.005.2007112114336.hdf
  Preferred POSIX equivalent is:
/cygdrive/c/Users/biocarbon/Documents/MOD13A3.A2001091.h20v09.005.2007112114336.hdf
  CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Warning messages:
1: running command 'wget --quiet --cache=off "
ftp://e4ftl01.cr.usgs.gov/MOLT/MOD13A3.005/2001.05.01/MOD13A3.A2001091.h20v09.005.2007112114336.hdf"
-O
"C:/Users/biocarbon/Documents/MOD13A3.A2001091.h20v09.005.2007112114336.hdf"'
had status 8
2: In download.file(paste(MOD13A3, dates$dirname[[i]], "/", BLOCK1,  :
  download had nonzero exit status


I presume wget is working correctly and that I have specified the correct
server credentials as per the original example code. I am currently
manually downloading data using FileZilla so I presume the server is
working. Is wget allowed to access data on this server? If not are there
other tools I can use to download the data?

Any help on the above mentioned error would be greatly appreciated.

Many thanks and kind regards,
Wesley


-- 
Dr Wesley Roberts
jwesroberts at gmail.com
Cell: +27(0)83 5355 646
skype: roberts-w

    [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list