Description Usage Arguments Value Examples
Read shoreline from GSHHG
1 2 | read_shoreline(resolution = "c", levels = c(1, 5),
path = getOption("shoreline.path"))
|
resolution |
resolution at which the data should be read; either the full name, an abbreviation, or a number.
|
levels |
levels of the data that should be read
|
path |
path to the GSHHG data. By defautl this is set by an option. If the data is not found, it will be downloaded. |
A "simple feature" (sf
) object.
1 2 3 4 5 6 7 8 9 10 11 12 13 | shorepath <- system.file("extdata", ".", package="shoreliner")
# NB: this is a very reduced version of the data, only for tests
# various abbreviations can be used
w <- read_shoreline("cruise", 1, path=shorepath)
w <- read_shoreline("c", 1, path=shorepath)
w <- read_shoreline(1, 1, path=shorepath)
plot(w, max.plot=1)
# the resulting objet can be manipulated with all the functions in sf
sf::st_bbox(w)
plot(sf::st_crop(w, xmin=-10, xmax=50, ymin=30, ymax=70), max.plot=1)
# etc.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.