Emodnet.wfs
Access EMODnet Web Feature Service data through R
Install / Use
/learn @EMODnet/Emodnet.wfsREADME
emodnet.wfs: Access EMODnet Web Feature Service data through R <a href="https://docs.ropensci.org/emodnet.wfs/"><img src="man/figures/logo.png" align="right" height="139" alt="emodnet.wfs website" /></a>
<!-- badges: start --> <!-- badges: end -->The goal of emodnet.wfs is to allow interrogation of and access to EMODnet’s, European Marine Observation and Data Network, geographic vector data in R through the EMODnet Web Feature Services. Web Feature services (WFS) represent a change in the way geographic information is created, modified and exchanged on the Internet and offer direct fine-grained access to geographic information at the feature and feature property level. Features are representation of geographic entities, such as a coastlines, marine protected areas, offshore platforms, or fishing areas. In WFS, features have geometry (spatial information) and attributes (descriptive data). emodnet.wfs aims at offering an user-friendly interface to this rich data.
Installation and setup
You can install emodnet.wfs from CRAN:
install.packages("emodnet.wfs")
Alternatively, you can install the development version of emodnet.wfs from the rOpenSci R-universe with:
install.packages("emodnet.wfs", repos = c("https://ropensci.r-universe.dev", "https://cloud.r-project.org"))
Or from GitHub with:
# install.packages("pak")
pak::pak("EMODnet/emodnet.wfs")
If you want to avoid reading messages from emodnet.wfs such as “WFS
client created successfully”, set the "emodnet.wfs.quiet" option to
TRUE.
options("emodnet.wfs.quiet" = TRUE)
The use of the EMODnet Web Feature Services is not subjet to rate limiting at the moment.
Pre-requisites
The emodnet.wfs is designed to be compatible with the modern R
geospatial stack, in particular output geospatial objects are
sf objects, that is to say, a
tibble with a geometry list-column.
For users not familiar yet with geospatial data in R, we recommend the following resources:
-
Spatial Data Science With Applications in R by Edzer Pebesma and Roger Bivand.
-
Geocomputation with R by Robin Lovelace, Jakub Nowosad and Jannes Muenchow.
In the documentation we assume a basic familiarity with spatial data: knowing about coordinates and about projections / coordinate reference systems (CRS).
Available data sources (services)
All available data sources, called services, are contained in the
tibble returned by emodnet_wfs().
library(emodnet.wfs)
services <- emodnet_wfs()
class(services)
#> [1] "tbl_df" "tbl" "data.frame"
names(services)
#> [1] "emodnet_thematic_lot" "service_name" "service_url"
services[, c("emodnet_thematic_lot", "service_name")]
#> # A tibble: 17 × 2
#> emodnet_thematic_lot service_name
#> <chr> <chr>
#> 1 EMODnet Bathymetry bathymetry
#> 2 EMODnet Biology biology
#> 3 EMODnet Biology biology_occurrence_data
#> 4 EMODnet Chemistry chemistry_cdi_data_discovery_and_access_service
#> 5 EMODnet Chemistry chemistry_cdi_distribution_observations_per_categor…
#> 6 EMODnet Chemistry chemistry_contaminants
#> 7 EMODnet Chemistry chemistry_marine_litter
#> 8 EMODnet Geology geology_coastal_behavior
#> 9 EMODnet Geology geology_events_and_probabilities
#> 10 EMODnet Geology geology_marine_minerals
#> 11 EMODnet Geology geology_sea_floor_bedrock
#> 12 EMODnet Geology geology_seabed_substrate_maps
#> 13 EMODnet Geology geology_submerged_landscapes
#> 14 EMODnet Human Activities human_activities
#> 15 EMODnet Physics physics
#> 16 EMODnet Seabed Habitats seabed_habitats_general_datasets_and_products
#> 17 EMODnet Seabed Habitats seabed_habitats_individual_habitat_map_and_model_da…
EMODnet data covers several disciplines organized in 7 thematic lots: bathymetry, biology, chemistry, geology, human activities, physics, seabed habitats. Some thematic lots organize their data in more than one data source or service.
To explore available services you can use View() or your usual way to
explore data.frames.
Initialise a WFS Service Client
A WFS service client is responsible for sending requests to a WFS server and processing the responses to retrieve, display, or analyze geospatial features. As such, initialising a client is the first step to interacting with an EMODnet Web Feature Services.
Specify the service using the service argument.
wfs_bio <- emodnet_init_wfs_client(service = "biology")
#> Loading ISO 19139 XML schemas...
#> Loading ISO 19115-3 XML schemas...
#> Loading ISO 19139 codelists...
#> ✔ WFS client created successfully
#> ℹ Service: "https://geo.vliz.be/geoserver/Emodnetbio/wfs"
#> ℹ Version: "2.0.0"
wfs_bio
#> <WFSClient>
#> ....|-- url: https://geo.vliz.be/geoserver/Emodnetbio/wfs
#> ....|-- version: 2.0.0
#> ....|-- capabilities <WFSCapabilities>
List contents of a WFS: Get layer information from a service client
In the context of a Web Feature Service (WFS), a layer refers to a logical grouping of geographic features that share the same schema (i.e., the same feature type, geometry, and attributes). Layers are the units of data that clients can query, retrieve, and manipulate through a WFS.
You can access information (metadata) about each layer available from an
EMODnet WFS with emodnet_get_wfs_info()
emodnet_get_wfs_info(service = "biology")
#> ✔ WFS client created successfully
#> ℹ Service: "https://geo.vliz.be/geoserver/Emodnetbio/wfs"
#> ℹ Version: "2.0.0"
#> # A tibble: 39 × 9
#> # Rowwise:
#> data_source service_name service_url layer_name title abstract class format
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 emodnet_wfs biology https://geo.… cti_macro… Comm… "Ocean … WFSF… sf
#> 2 emodnet_wfs biology https://geo.… mediseh_c… EMOD… "Coral … WFSF… sf
#> 3 emodnet_wfs biology https://geo.… mediseh_c… EMOD… "Coral … WFSF… sf
#> 4 emodnet_wfs biology https://geo.… mediseh_c… EMOD… "Cymodo… WFSF… sf
#> 5 emodnet_wfs biology https://geo.… Species_g… EMOD… "This d… WFSF… sf
#> 6 emodnet_wfs biology https://geo.… Species_g… EMOD… "This d… WFSF… sf
#> 7 emodnet_wfs biology https://geo.… Species_g… EMOD… "This d… WFSF… sf
#> 8 emodnet_wfs biology https://geo.… Species_g… EMOD… "This d… WFSF… sf
#> 9 emodnet_wfs biology https://geo.… mediseh_h… EMOD… "Haloph… WFSF… sf
#> 10 emodnet_wfs biology https://geo.… mediseh_m… EMOD… "Maërl … WFSF… sf
#> # ℹ 29 more rows
#> # ℹ 1 more variable: layer_namespace <chr>
or you can pass a wfs client object.
emodnet_get_wfs_info(wfs_bio)
#> # A tibble: 39 × 9
#> # Rowwise:
#> data_source service_name service_url layer_name title abstract class format
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 emodnet_wfs biology https://geo.… cti_macro… Comm… "Ocean … WFSF… sf
#> 2 emodnet_wfs biology https://geo.… mediseh_c… EMOD… "Coral … WFSF… sf
#> 3 emodnet_wfs biology https://geo.… mediseh_c… EMOD… "Coral … WFSF… sf
#> 4 emodnet_wfs biology https://geo.… mediseh_c… EMOD… "Cymodo… WFSF… sf
#> 5 emodnet_wfs biology https://geo.… Species_g… EMOD… "This d… WFSF… sf
#> 6 emodnet_wfs biology https://geo.… Species_g… EMOD… "This d… WFSF… sf
#> 7 emodnet_wfs biology https://geo.… Species_g… EMOD… "This d… WFSF… sf
#> 8 emodnet_wfs biology https://geo.… Species_g… EMOD… "This d… WFSF… sf
#> 9 emodnet_wfs biology https://geo.… mediseh_h… EMOD… "Haloph… WFSF… sf
#> 10 emodnet_wfs biology https://geo.… mediseh_m… EMOD… "Maërl … WFSF… sf
#> # ℹ 29 more rows
#> # ℹ 1 more variable: layer_namespace <chr>
You can also get info for specific layers from wfs object:
layers <- c("mediseh_zostera_m_pnt", "mediseh_posidonia_nodata")
emodnet_get_layer_info(wfs = wfs_bio, layers = layers)
#> # A tibble: 2 × 9
#> # Rowwise:
#> data_source service_name service_url layer_name ti
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
