Returns the data source watersurfaces_refpoints as an sf point layer (CRS: EPSG:31370) or as a tibble with easting (x) and northing (y) columns for the same coordinate reference system (CRS). By default, the data source is filtered so that only the rows are returned that match the polygons of a single version of watersurfaces_hab.

read_watersurfaces_refpoints(
  file = file.path(locate_n2khab_data(), "20_processed/watersurfaces_refpoints"),
  spatial = TRUE,
  version = c("watersurfaces_refpoints_v6", "watersurfaces_refpoints_v5",
    "watersurfaces_refpoints_v4", "watersurfaces_refpoints_v6.1_interim"),
  single_wsh_version = TRUE,
  file_wsh = file.path(locate_n2khab_data(),
    "20_processed/watersurfaces_hab/watersurfaces_hab.gpkg"),
  version_wsh = NULL,
  ...
)

Arguments

file

The absolute or relative file path of the data source. The default follows the data management advice in the vignette on data storage (run vignette("v020_datastorage")). It uses the first n2khab_data folder that is found when sequentially climbing up 0 to 10 levels in the file system hierarchy, starting from the working directory.

spatial

Should the result be a spatial (sf) layer?

version

Version ID of the data source. Defaults to the latest available version defined by the package. Versions with the 'interim' suffix are designed to be used within the Research Institute for Nature and Forest (INBO) only.

single_wsh_version

Logical. Should watersurfaces_refpoints be limited to the polygons of a single version of watersurfaces_hab, as returned by read_watersurfaces_hab?

file_wsh

The absolute or relative file path of the watersurfaces_hab data source. Ignored if single_wsh_version is FALSE.

version_wsh

Version ID of the watersurfaces_hab data source; passed to the version argument of read_watersurfaces_hab. Ignored if single_wsh_version is FALSE. The default is to take the default of read_watersurfaces_hab. It is required that the version of watersurfaces_refpoints is equal to or larger than that of watersurfaces_hab, and this is verified directly with the file checksums.

...

Further arguments passed to read_watersurfaces_hab.

Value

By default, a Simple feature collection of type POINT (CRS: EPSG:31370), otherwise a tibble with easting (x) and northing (y) columns for the same coordinate reference system (CRS). Further attributes are the same:

polygon_id

The polygon_id from watersurfaces_hab. If single_wsh_version is TRUE, then this is a factor, otherwise a character.

in_polygon

Logical. Did the point lie inside the polygon it refers, at the time of creation? Note that the polygon's geometry may have changed since then; it may not currently hold.

Details

watersurfaces_refpoints is a data source in the vc-format, available at Zenodo, which provides points that uniquely represent polygons from the watersurfaces_hab data source. It represents multiple versions of watersurfaces_hab, and it is complete at least since version watersurfaces_hab_v4. This is accomplished by adding new rows for all polygons with a new ID in a new version of watersurfaces_hab, hereby recycling existing points that are overlapped by such polygons (because new IDs don't necessarily mean new watersurfaces).

The R-code for creating the watersurfaces_refpoints data source can be found in the n2khab-preprocessing repository.

References

  • Leyssen A., Scheers K., Packet J., Van Hecke F., Wils C. (2024). Watervlakken 2024: Polygonenkaart van stilstaand water in Vlaanderen. Uitgave 2024. Rapporten van het Instituut voor Natuur- en Bosonderzoek 2024 (52). Instituut voor Natuur en Bosonderzoek, Brussel. doi:10.21436/inbor.114075267 . #'

  • De Saeger S., Dhaluin P., Erens R., Guelinckx G., Hennebel D., Jacobs I., Kumpen M., Van Oost F., Spanhove T., Leyssen A., Oosterlynck P., Van Dam G., Van Hove M., Wils C. (red.) (2023). Biologische Waarderingskaart en Natura 2000 Habitatkaart, uitgave 2023. (Rapporten van het Instituut voor Natuur- en Bosonderzoek; Nr. 31). Instituut voor Natuur- en Bosonderzoek (INBO). doi:10.21436/inbor.96375305 .

See also

Other functions involved in processing the 'habitatmap' data source: read_habitatmap(), read_habitatmap_stdized(), read_habitatmap_terr(), read_watersurfaces_hab()

Other functions involved in processing the 'watersurfaces' data source: read_watersurfaces(), read_watersurfaces_hab()

Examples

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_hab'
# 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.

read_watersurfaces_refpoints()
read_watersurfaces_refpoints(spatial = FALSE)
read_watersurfaces_refpoints(single_wsh_version = FALSE)
}