Skip to contents

Generic entry point to get OCS GE (Occupation du Sol à Grande Echelle) polygons, with their cover (code_cs) and use (code_us) codes, for a Region of Interest (ROI). The source argument selects where the data come from:

"ign"

the official per-department deliveries of the IGN Géoplateforme, see get_ocsge_data_ign. Nothing to host, but each department is downloaded in full the first time.

"fgb"

a remote FlatGeobuf file that you host, see get_ocsge_data_fgb. Only the features of the ROI are downloaded.

Usage

get_ocsge(roi, source = c("ign", "fgb"), ...)

Arguments

roi

An sf (or sfc) object defining the Region Of Interest.

source

Character. "ign" (default) or "fgb".

...

Arguments passed to the function of the selected source: year, cache_dir and quiet for "ign", fgb_url for "fgb".

Value

An sf object containing the OCS GE polygons clipped to the ROI.

See also

join_ocsge_species to score the polygons for a species, and get_eunis_data for the EUNIS land cover.

Examples

if (FALSE) { # \dontrun{
  data(roi_metaleurop)

  # from the IGN Géoplateforme (latest vintage of each department)
  ocsge_data <- get_ocsge(roi_metaleurop)
  ocsge_data <- get_ocsge(roi_metaleurop, source = "ign", year = 2021)

  # from a FlatGeobuf file
  ocsge_data <- get_ocsge(roi_metaleurop, source = "fgb",
                          fgb_url = "https://example.com/data/ocsge_france.fgb")
} # }