ne_coastline: Get natural earth world coastline

View source: R/ne_coastline.R

ne_coastlineR Documentation

Get natural earth world coastline

Description

returns world coastline at specified scale

Usage

ne_coastline(scale = 110L, returnclass = c("sf", "sv"))

Arguments

scale

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

returnclass

A string determining the spatial object to return. Either "sf" for for simple feature (from 'sf', the default) or "sv" for a 'SpatVector' (from 'terra').

Details

Note that the filename of the requested object will be returned if 'load = FALSE'.

If the data is to be loaded into memory ('load = TRUE'), the download will be handled using the GDAL virtual file system, allowing direct access to the data without writing it to disk.

Value

An object of class 'sf' for simple feature (from 'sf', the default) or 'SpatVector' (from 'terra').

See Also

ne_load, pre-downloaded data are available using ne_countries, ne_states. Other geographic data are available in the raster package : getData.

Examples

if (requireNamespace("rnaturalearthdata")) {
  coast <- ne_coastline()
  plot(coast)
}


AndySouth/rnaturalearth documentation built on April 14, 2025, 3:22 a.m.