read_shoreline: Read shoreline from GSHHG

Description Usage Arguments Value Examples

Description

Read shoreline from GSHHG

Usage

1
2
read_shoreline(resolution = "c", levels = c(1, 5),
  path = getOption("shoreline.path"))

Arguments

resolution

resolution at which the data should be read; either the full name, an abbreviation, or a number.

  • 1 : cruise (c)

  • 2 : low (l)

  • 3 : intermediate (i)

  • 4 : high (h)

  • 5 : full (f)

levels

levels of the data that should be read

  • 1: Continental land masses and ocean islands, except Antarctica.

  • 2: Lakes

  • 3: Islands in lakes

  • 4: Ponds in islands within lakes

  • 5: Antarctica based on ice front boundary.

  • 6: Antarctica based on grounding line boundary.

path

path to the GSHHG data. By defautl this is set by an option. If the data is not found, it will be downloaded.

Value

A "simple feature" (sf) object.

Examples

 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.

jiho/shoreliner documentation built on May 21, 2019, 1:43 a.m.