watersurfaces
as an sf
polygon layerR/read_habitatdata.R
read_watersurfaces.Rd
Returns the raw data source watersurfaces
(Scheers et al., 2022)
as a standardized sf
polygon layer
(tidyverse-styled, internationalized) in the Belgian Lambert 72 CRS
(EPSG-code 31370).
read_watersurfaces( file = NULL, extended = FALSE, fix_geom = FALSE, version = c("watersurfaces_v1.2", "watersurfaces_v1.1", "watersurfaces_v1.0") )
file | Optional string. An absolute or relative file path of
the data source. If left |
---|---|
extended | Logical.
Should names or explanations of codes be added as extra
variables in the result?
Currently only applies to |
fix_geom | Logical.
Should invalid or corrupt geometries be fixed in the resulting |
version | Version ID of the data source. Defaults to the latest available version defined by the package. |
A Simple feature collection of
type POLYGON
, sorted by polygon_id
, with the following
variables (not mentioning extra 'name' variables for
extended = TRUE
):
polygon_id
: code of the polygon;
wfd_code
: optional; Flemish code of the water body with
regard to the Water Framework Directive (WFD);
hyla_code
: optional; code of the watersurface according to the
Flemish working group 'Hyla', a working group on amphibians & reptiles;
name
: name of the watersurface;
area_name
: name of the area;
wfd_type
: type code according to the Flemish WFD typology
(Denys, 2009);
wfd_type_certain
: Logical.
Is there high confidence about the wfd_type
determination?
depth_class
: class of water depth;
connectivity
: connectivity class;
usage
: usage class;
water_level_management
: water-level management class (not in
older versions).
If file
is not specified, the function will try to read the file
in the default folder for data storage (as described in the data management
advice in the vignette (run vignette("v020_datastorage")
)).
If you want to use another file or file structure than the default
data storage, you can specify your own file
.
In both cases: always make sure to specify the correct version
, that
is the version corresponding to the file
(note that the version
defaults to the latest version).
See Scheers et al. (2022) for an elaborate explanation of the data source and its attributes.
Denys L. (2009). Een a posteriori typologie van stilstaande, zoete wateren in Vlaanderen. Rapporten van het Instituut voor Natuur- en Bosonderzoek INBO.R.2009.34. Instituut voor Natuur- en Bosonderzoek, Brussel.
Scheers K., Smeekens V., Wils C., Packet J., Leyssen A. & Denys L. (2022). Watervlakken versie 1.2: Polygonenkaart van stilstaand water in Vlaanderen. Uitgave 2022. Instituut voor Natuur- en Bosonderzoek. doi:10.21436/inbor.87014272 .
Other functions involved in processing the 'watersurfaces' data source:
read_watersurfaces_hab()
Other functions returning environmental data sets:
read_shallowgroundwater()
,
read_soilmap()
,
read_watercourse_100mseg()
if (FALSE) { # This example supposes that your working directory or a directory up to 10 # levels above has the 'n2khab_data' folder AND that the latest version of # the 'watersurfaces' data source is present in the default subdirectory. # In all other cases, this example won't work but at least you can # consider what to do. ws <- read_watersurfaces() ws summary(ws) ws_valid <- read_watersurfaces(fix_geom = TRUE) ws_valid all(sf::st_is_valid(ws)) all(sf::st_is_valid(ws_valid)) ws2 <- read_watersurfaces(extended = TRUE) ws2 }