extract_soil_map_data: Extract soil properties from Flemish soil map

View source: R/extract_soil_map_data.R

extract_soil_map_dataR Documentation

Extract soil properties from Flemish soil map

Description

This function queries the the Flemish soil map # nolint attributes at a given coordinate, by using the affiliated WFS service provided by DOV. The user can pick the properties of interest. See the examples section to see how to obtain a full list of possible properties of interest. Coordinates should be given in the 'Belge 1972 / Belgian Lambert 72' (EPSG:31370) coordinate reference system. When outside the Flemish region, an NA value is given for each of the properties.

Usage

extract_soil_map_data(x_lam, y_lam, properties_of_interest)

Arguments

x_lam

The numeric value of the X coordinate in CRS 'Belge 1972 / Belgian Lambert 72' (EPSG:31370).

y_lam

The numeric value of the Y coordinate in CRS 'Belge 1972 / Belgian Lambert 72' (EPSG:31370).

properties_of_interest

A vector or properties, as a subset of these provided by the webservice (see the examples section for how to obtain the list). Default Bodemserie, Unibodemtype and Bodemtype.

Value

A data.frame with the properties as column headers.

See Also

Other download_functions: download_knmi_data_hour(), download_zenodo(), read_kmi_data(), read_kml_file(), read_knmi_data(), read_mow_data()

Examples

## Not run: 
library(inborutils)
extract_soil_map_data(173995.67, 212093.44)

# code to obtain list of all possible soil properties
library(ows4R)
library(purrr)
wfs <- "https://www.dov.vlaanderen.be/geoserver/bodemkaart/bodemtypes/wfs"
wfs_client <- WFSClient$new(wfs,
  serviceVersion = "1.1.0"
)
wfs_client$
  getCapabilities()$
  findFeatureTypeByName("bodemkaart:bodemtypes")$
  getDescription() %>%
  map_chr(function(x) {
    x$getName()
  })

extract_soil_map_data(173995.67, 212093.44,
  properties_of_interest = c(
    "Eenduidige_legende",
    "Textuurklasse"
  )
)

## End(Not run)

inbo/inborutils documentation built on Nov. 23, 2023, 4:42 a.m.