raster (version 1.0.4)

getData: Get geographic data

Description

Get geographic data objects for anywhere in the world. Data are read from files that are first downloaded if necessary

Usage

getData(name, download=TRUE, path='', ...)

Arguments

name
Data set name, currently supported are 'GADM', 'SRTM', 'alt', and 'worldclim'
download
Logical. If TRUE data will be downloaded if not locally available
path
path name to store the data. Default is the current working directory
...
additional required(!) paramenters, data set specific. See Details

Value

  • A spatial object (Raster* or Spatial*)

Details

'alt' stands for altitude (elevation); the data were aggregated from SRTM 90 m resolution data between -60 and 60 latitude. GADM is a database of global administrative boundaries. Worldclim is a database of global interpolated climate data. SRTM refers to the hole-filled CGIAR-SRTM (90 m resolution). If name is 'alt' or 'GADM' you must provide a 'country=' argument. Countries are specified by their 3 letter ISO codes. Use getData('ISO3') to see these codes. In the case of GADM you must also provide the level of administrative subdivision (0=country, 1=first level subdivision). In the case of alt you can set 'mask' to FALSE. If it is TRUE values for neighbouring countries are set to NA. For example: getData('GADM', country='FRA', level=1) getData('alt', country='FRA', mask=TRUE) If name is 'SRTM' you must provide 'lon' and 'lat' arguments (longitude and latitude). These should be single numbers somewhere within the SRTM tile that you want. getData('SRTM', lon=5, lat=45) If name='worldclim' you must also provide a variable name 'var=', and a resolution 'res='. Valid variables names are 'tmin', 'tmax', 'prec' and 'bio'. Valid resolutions are 0.5, 2.5, 5, and 10 (minutes of a degree). In the case of res=0.5, you must also provide a lon and lat argument for a tile; for the lower resolutions global data will be downloaded. In all cases there are 12 (monthly) files for each variable except for 'bio' which contains 19 files. getData('worldclim', var='tmin', res=0.5, x=5, y=45) getData('worldclim', var='bio', res=10)

References

http://www.worldclim.org http://www.gadm.org http://srtm.csi.cgiar.org/ http://diva-gis.org/gdata