# ex 1 ############
# drawing the extent. NOTE: It is not possible to draw a date-line crossing area!
# draw extent with zoom, for smaller extents
getTile()
# ex 2 ############
# 'extent' specified with a 'Spatial*' object (taken from ?rgdal::readOGR)
dsn <- system.file("vectors/Up.tab", package = "rgdal")[1]
Up <- rgdal::readOGR(dsn, "Up")
getTile(extent = Up)
# ex 3 ############
# with 'tileH' and 'tileV'
getTile(tileH = 18:19, tileV = 4)
# ex 4 ############
# with 'extent' of class 'list'
Austria <- list(ymin = 46.12, ymax = 49.3, xmin = 9.2, xmax = 17.47)
getTile(extent = Austria)
getTile(extent = Austria, buffer = 10)
getTile(extent = Austria, buffer = c(0, 10)) # x, y
# ex 5 ############
# with 'extent' or 'Raster*' object from "raster" package
rasterObject <- raster(xmn = 9.2, xmx = 17.47, ymn = 46.12, ymx = 49.3,
crs = "+init=epsg:4326")
getTile(extent = rasterObject)
getTile(extent = extent(rasterObject))
# also works for projected data
rasterObject2 <- projectExtent(rasterObject, crs = "+init=epsg:32633")
getTile(extent = rasterObject2)
# ex 6 #################
# Character name of a map contained in map("worldHires", plot = FALSE)$names
getTile(extent = "Austria")
getTile(extent = c("Austria", "Germany"))
# Search for specific map name patterns (use with caution):
m1 <- search4map("Per")
getTile(extent = m2)
# Or use 'map' objects directly (remember to use map(..., fill = TRUE)):
m2 <- map("state", region = c("new york", "new jersey", "penn"), fill = TRUE)
getTile(extent = m2)
# SRTM and MERIS data
getTile(extent = c("austria", "germany", "switzerland"), system = "SRTM")
getTile(extent = c("austria", "germany", "switzerland"), system = "MERIS")
Run the code above in your browser using DataLab