Learn R Programming

giscoR (version 0.1.1)

gisco_get_coastallines: Download Coastal Lines from GISCO

Description

Downloads a simple feature (sf) object.

Usage

gisco_get_coastallines(
  resolution = "20",
  year = "2016",
  epsg = "4326",
  cache = TRUE,
  update_cache = FALSE,
  cache_dir = NULL
)

Arguments

resolution

Resolution of the geospatial data. One of

  • "60" (1:60million),

  • "20" (1:20million)

  • "10" (1:10million)

  • "03" (1:3million) or

  • "01" (1:1million).

year

Release year. One of "2006", "2010", "2013" or "2016"

epsg

projection of the map: 4-digit EPSG code. One of:

  • "4326" - WGS84

  • "3035" - ETRS89 / ETRS-LAEA

  • "3857" - Pseudo-Mercator

cache

a logical whether to do caching. Default is TRUE.

update_cache

a logical whether to update cache.

cache_dir

a path to a cache directory. The directory have to exist. The NULL (default) uses and creates /gisco directory in the temporary directory from tempdir. The directory can also be set with options(gisco_cache_dir = <path>.

Value

a POLYGON object on sf format.

Examples

Run this code
# NOT RUN {
library(sf)

coastlines <- gisco_get_coastallines()
plot(st_geometry(coastlines), col = "palegreen", border = "lightblue3")
title(main = "Coastal Lines",
      sub = gisco_attributions(copyright = FALSE),
      line = 1)
# }

Run the code above in your browser using DataLab