Skip to contents

returns world coastline at specified scale

Usage

ne_coastline(scale = 110, returnclass = c("sp", "sf"))

Arguments

scale

scale of map to return, one of 110, 50, 10 or 'small', 'medium', 'large'

returnclass

'sp' default or 'sf' for Simple Features

Value

SpatialLinesDataFrame or sf

Examples

if (requireNamespace("rnaturalearthdata")) {
  sldf_coast <- ne_coastline()

  if (require(sp)) {
    plot(sldf_coast)
  }
}
#> Loading required namespace: rnaturalearthdata
#> Warning: The `returnclass` argument of `ne_download()` sp as of rnaturalearth 1.0.0.
#>  Please use `sf` objects with {rnaturalearth}, support for Spatial objects
#>   (sp) will be removed in a future release of the package.
#> Loading required package: sp