Downloads worldwide coastlines.
Usage
gisco_get_coastal_lines(
year = 2016,
epsg = 4326,
cache = TRUE,
update_cache = FALSE,
cache_dir = NULL,
verbose = FALSE,
resolution = 20,
ext = "gpkg"
)Source
https://gisco-services.ec.europa.eu/distribution/v2/
Copyright: https://ec.europa.eu/eurostat/web/gisco/geodata/statistical-units
Arguments
- year
character string or number. Release year of the file. One of
"2016","2013","2010","2006".- epsg
character string or number. Projection of the map: 4-digit EPSG code. One of:
"4326": WGS84"3035": ETRS89 / ETRS-LAEA"3857": Pseudo-Mercator
- cache
logical. Whether to do caching. Default is
TRUE. See Caching strategies section ingisco_set_cache_dir().- update_cache
logical. Should the cached file be refreshed?. Default is
FALSE. When set toTRUEit would force a new download.- cache_dir
character string. A path to a cache directory. See Caching strategies section in
gisco_set_cache_dir().- verbose
logical. If
TRUEdisplays informational messages.- resolution
character string or number. Resolution of the geospatial data. One of:
"60": 1:60 million."20": 1:20 million."10": 1:10 million."03": 1:3 million."01": 1:1 million.
- ext
character. Extension of the file (default
"gpkg"). One of"shp","gpkg","geojson".
Value
A sf object.
Note
Please check the download and usage provisions on gisco_attributions().
See also
See gisco_bulk_download() to perform a bulk download of datasets.
Other statistical units datasets:
gisco_get_census(),
gisco_get_lau(),
gisco_get_nuts(),
gisco_get_urban_audit()
Examples
coast <- gisco_get_coastal_lines()
library(ggplot2)
ggplot(coast) +
geom_sf(color = "#1278AB", fill = "#FDFBEA") +
# Zoom on Mediterranean Sea
coord_sf(
xlim = c(-4, 35),
ylim = c(31, 45)
) +
theme_minimal() +
theme(
panel.background = element_rect(fill = "#C7E7FB", color = NA),
panel.border = element_rect(colour = "black", fill = NA)
)
