Skip to content
Prev 11205 / 29559 Next

RgoogleMaps

Following on  that I wish to download several single tiles. To do it I declare the tile extension I wish to download and adapting Robert's hint  I do the following
library(dismo)
#I need to load XML as well
library(XML)
library(maptools)
library(rgdal)
#declare the extent
e = extent(36.1195,36.1205,5.8725,5.8735)
#got the map, exp less than 1.0 zooms the result
r <- gmap(e, type="satellite", filename="mypath/mynumbered.gif", exp=1.0)
#check the result
plot(r)

The thing is that now I want to download several tiles getting the extent from a table that looks like that
       xmin     xmax     ymin     ymax num
1  36.09940 36.10340 5.671173 5.675173  10
2  36.19274 36.19674 5.665194 5.669194  15
3  36.17748 36.18148 5.820774 5.824774  19
4  36.19274 36.19674 5.665194 5.669194  43
5  36.09940 36.10340 5.671173 5.675173  44
6  36.17748 36.18148 5.820774 5.824774  46
so I want pass values from the table to 'extent' and get and numbered gif for each.
Any ideas?
Cheers
Agustin
sessionInfo
R version 2.11.1 Patched (2010-08-26 r52824)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US/en_US/en_US/C/en_US/en_US

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] maps_2.1-4      gpclib_1.5-1    maptools_0.7-38 lattice_0.18-8  foreign_0.8-40  XML_3.2-0       dismo_0.5-11    rJava_0.8-8     raster_1.7-29  
[10] rgdal_0.6-28    sp_0.9-76      

loaded via a namespace (and not attached):
[1] grid_2.11.1  tools_2.11.1
On Feb 3, 2011, at 9:12 PM, Robert Hijmans wrote: