emodnet_get_layers | R Documentation |
Performs an WFS getFeature request for layers from a wfs
object or
specified EMODnet Service. Filtering
of layer features can also be handled via ECQL language filters.
emodnet_get_layers(
wfs = NULL,
service = NULL,
service_version = NULL,
layers,
crs = NULL,
cql_filter = NULL,
simplify = FALSE,
reduce_layers = deprecated(),
...
)
wfs |
A |
service |
the EMODnet OGC WFS service name.
For available services, see |
service_version |
|
layers |
a character vector of layer names. To get info on layers,
including
|
crs |
integer. EPSG code for the output crs. If |
cql_filter |
character. Features returned can be filtered using valid Extended Common Query Language (ECQL) filtering statements (https://docs.geoserver.org/stable/en/user/filter/ecql_reference.html). Should be one of:
|
simplify |
whether to reduce output layers to a single |
reduce_layers |
|
... |
additional vendor parameter arguments passed to
|
If simplify = FALSE
(default), a list of sf
objects, one element for each layer. Any layers for which download was
unsuccessful will be NULL. If simplify = TRUE
, all layers are
reduced (if possible: if all
column names are the same) to a single sf
containing data for all layers.
NULL
layers are ignored. simplify = TRUE
can also be used to return
an sf
out of a single layer request instead of a list of length 1.
If a layer is really big (like "abiotic_observations"
of the
"biology_occurrence_data"
service),
you might consider a combination of these ideas:
using outputFormat = "CSV"
;
filtering using cql_filters
or
bounding boxes
(possibly splitting the area of interests into several requests);
Using EMODnet's download toolbox.
# Layers as character vector
emodnet_get_layers(
service = "biology",
layers = c("mediseh_zostera_m_pnt", "mediseh_posidonia_nodata")
)
# Usage of cql_filter
emodnet_get_layers(
service = "biology",
layers = "mediseh_zostera_m_pnt",
cql_filter = "country = 'Francia'"
)
# Usage of vendor parameter
emodnet_get_layers(
service = "biology",
layers = "mediseh_zostera_m_pnt",
count = 1
)
# Usage of csv output
data <- emodnet_get_layers(
service = "biology_occurrence_data",
layers = "abiotic_observations",
outputFormat = "CSV"
)
str(data[["abiotic_observations"]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.