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

Wilson, Bruce Edwin bwilso27 at utk.edu
Mon Dec 10 17:12:32 CET 2012


Wesley -- it depends on how large your study area is.  If it's less than 201 km area of interest, there is an application at http://daac.ornl.gov/MODIS that will give you csv time series subsets of MODIS data.  That may be another useful option.  I believe they've developed a REST web service interface to that MODIS toolset.  

===================================
Bruce E. Wilson (wilsonbe at ornl.gov)


On Dec 10, 2012, at 8:30 AM, "Wesley Roberts" <jwesroberts at gmail.com> wrote:

> Many thanks Matteo,
> 
> I downloaded the file and installed the zip to my local R directory. Am
> busy trying to figure out how the package works.
> 
> My workflow is very simple, I would like to download some MODIS Albedo and
> EVI data to conduct a Change Vector Analysis for our study area. I am able
> to undertake the exercise using standard gdal, grass, qgis tools however, I
> would like to try and accomplish the task using an R script only. As such I
> would like all of the processing to be done within the R script.
> 
> 
> Do you have any example scripts I could use to become more familiar with
> the tools? I have the manual and will use that for now.
> 
> Many thanks,
> Wesley
> 
> 
> On Mon, Dec 10, 2012 at 3:48 PM, Matteo Mattiuzzi <
> matteo.mattiuzzi at boku.ac.at> wrote:
> 
>> 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
> 
> 
> -- 
> 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