read_habitatmap_terr() returns the data source habitatmap_terr as a list of two objects: habitatmap_terr_polygons, having the Belgian Lambert 72 CRS (EPSG-code 31370), and habitatmap_terr_types. habitatmap_terr is the further interpreted, terrestrial part of habitatmap_stdized (see read_habitatmap_stdized), which, in turn, is derived from the raw data source habitatmap (De Saeger et al., 2020). By default, occurrences of type 7220 are dropped because a more reliable data source is available for this habitat type (see drop_7220 argument). Note: a type is a habitat (sub)type or a regionally important biotope (RIB).

read_habitatmap_terr(
file = file.path(fileman_up("n2khab_data"),
"20_processed/habitatmap_terr/habitatmap_terr.gpkg"),
keep_aq_types = TRUE,
drop_7220 = TRUE,
version = c("habitatmap_terr_2020_v1", "habitatmap_terr_2018_v2",
"habitatmap_terr_2018_v1")
)

## 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. Logical; TRUE by default. The data source habitatmap_terr aims at delineating all polygons with at least one (semi-)terrestrial type. For those polygons, it returns all known habitat types and RIBs as types. Hence, in several cases polygons do occur with a combination of terrestrial and aquatic types (see Details for a definition of 'aquatic'). Setting keep_aq_types = FALSE is convenient for use cases where one only wants to look at the (semi-)terrestrial types: this setting will discard all aquatic types in 'mixed' aquatic/terrestrial polygons. As each polygon always has at least one (semi-)terrestrial type, this will not affect the number of polygons returned, only the number of types. Logical; TRUE by default. Should occurrences of type 7220 be dropped from the result? To get more accurate information about type 7220, notably its occurrences, surface area and other characteristics, it is advised to use the habitatsprings data source and not habitatmap_terr - see read_habitatsprings(). Version ID of the data source. Defaults to the latest available version defined by the package.

## Value

A list of two objects:

• habitatmap_terr_polygons: a Simple feature collection of geometry type MULTIPOLYGON with four attribute variables:

• polygon_id

• description_orig: polygon description based on the original type codes in the habitatmap data source

• description: based on description_orig but with the interpreted type codes

• source: states where description comes from: either habitatmap_stdized or habitatmap_stdized + interpretation

• habitatmap_terr_types: a tibble with the following variables (the first 4 being identical to those in habitatmap_stdized):

• polygon_id

• type: the interpreted habitat or RIB type

• certain

• code_orig

• phab

• source: states where type comes from: either habitatmap_stdized or habitatmap_stdized + interpretation

Since version habitatmap_terr_2020_v1, rows are unique only by the combination of the polygon_id, type and certain columns.

## Details

habitatmap_terr was derived from habitatmap_stdized as follows:

• it excludes all polygons that are most probably aquatic habitat or RIB. These are the polygons for which all habitat or RIB types are aquatic. In the process, a distinction was also made between 2190_a and 2190_overig. There is no exclusion of aquatic types when these coexist with terrestrial types in the same polygon. The aquatic types are the types for which hydr_class == "HC3" in the types data source (hydr_class is the hydrological class; cf. the output of read_types());

• it excludes types which most probably are no habitat or RIB at all. Those are the types where code_orig contains "bos" or is equal to "6510,gh" or "9120,gh";

• it translates several main type codes into a corresponding subtype which they almost always represent: 6410 -> 6410_mo, 6430 -> 6430_hf, 6510 -> 6510_hu, 7140 -> 7140_meso, 9130 -> 9130_end;

• it distinguishes types rbbhfl and rbbhf.

The data source habitatmap_terr is a GeoPackage, available at Zenodo, that contains:

• habitatmap_terr_polygons: a spatial polygon layer

• habitatmap_terr_types: a table with the types that occur in each polygon.

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

## References

• De Saeger, S., Guelinckx, R., Oosterlynck, P., De Bruyn, A., Debusschere, K., Dhaluin, P., Erens, R., Hendrickx, P., Hennebel, D., Jacobs, I., Kumpen, M., Opdebeeck, J., Spanhove, T., Tamsyn, W., Van Oost, F., Van Dam, G., Van Hove, M., Wils, C., Paelinckx, D. (2020). Biologische Waarderingskaart en Natura 2000 Habitatkaart, uitgave 2020. (Rapporten van het Instituut voor Natuur- en Bosonderzoek; Nr. 35). Instituut voor Natuur- en Bosonderzoek (INBO). doi:10.21436/inbor.18840851 .

• De Saeger, S., Oosterlynck, P. & Paelinckx, D. (2017). The Biological Valuation Map (BVM): a field-driven survey of land cover and vegetation in the Flemish Region of Belgium. Documents phytosociologiques - Actes du colloque de Saint-Mandé 2012 - Prodrome et cartographie des végétations de France - 2017. Vol. 6: 372-382.

Other functions involved in processing the 'habitatmap' data source: read_habitatmap_stdized(), read_habitatmap(), 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 'habitatmap_terr'
# 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.

habmap_terr$habitatmap_terr_polygons habmap_terr$habitatmap_terr_types
habmap_terr_noaq$habitatmap_terr_polygons habmap_terr_noaq$habitatmap_terr_types