download.coastline {oce} | R Documentation |
Constructs a query to the NaturalEarth server [1] to download coastline data (or lake data, river data, etc) in any of three resolutions.
download.coastline(resolution, item = "coastline", destdir = ".", destfile, server = "naturalearth", debug = getOption("oceDebug"))
resolution |
A character value specifying the desired resolution. The permitted
choices are |
item |
A character value indicating the quantity to be downloaded.
This is normally one of |
destdir |
Optional string indicating the directory in which to store
downloaded files. If not supplied, |
destfile |
Optional string indicating the name of the file. If not supplied, the file name is constructed from the other parameters of the function call, so subsequent calls with the same parameters will yield the same result, thus providing the key to the caching scheme. |
server |
A character value specifying the server that is to suppply
the data. At the moment, the only permitted value is |
debug |
an integer specifying whether debugging information is
to be printed during the processing. This is a general parameter that
is used by many |
A character value indicating the filename of the result; if there is a problem of any kind, the result will be the empty string.
All of the download.*
functions are subject to change through the
year 2017. The plan is to create individual functions
as needs arise in everyday work, thereby discovering patterns of
arguments that might make sense more generally. Therefore, it is likely
that argument order (and even name) may change up until approximately
December 2016. Users are advised to refer to arguments by name,
i.e. not to rely on their order, and they are asked for patience,
because argument names and defaults may vary through the early development.
1. The NaturalEarth server is at http://www.naturalearthdata.com
The work is done with download.file
.
Other functions that download files: download.amsr
,
download.met
, download.topo
Other things related to coastline
data: [[,coastline-method
,
[[<-,coastline-method
,
as.coastline
,
coastline-class
,
coastlineBest
, coastlineCut
,
coastlineWorld
,
plot,coastline-method
,
read.coastline.openstreetmap
,
read.coastline.shapefile
,
subset,coastline-method
,
summary,coastline-method
## Not run: library(oce) # User must create directory ~/data/coastline first. # As of September 2016, the downloaded file, named # "ne_50m_coastline.zip", occupies 443K bytes. filename <- download.coastline(destdir="~/data/coastline") coastline <- read.coastline(filename) plot(coastline) ## End(Not run)