gmba_ids_from_points: Get mountain range IDs from points coordinates

View source: R/gmba_ids_from_points.R

gmba_ids_from_pointsR Documentation

Get mountain range IDs from points coordinates

Description

Get GMBA Inventory v2.0 mountain range IDs based on xy point coordinates.

Usage

gmba_ids_from_points(xy_dataframe, range_selection = "basic", manual = NULL)

Arguments

xy_dataframe

A dataframe containing point coordinates, with columns "x" and "y" i.e. longitude and latitude

range_selection

Character string, the options are:

  • "all" = all level ranges, cross-scale (attention: may need some processing time!)

  • "basic" = basic mountain ranges only (default)

  • "300" = ranges included in the 300 pre-selection

  • "100" = ranges included in the 100 pre-selection

  • "level1"-"level10" = ranges pertaining to the respective level of the inventory hierarchy

  • "manual" = range IDs provided with manual

manual

Character string containing the IDs of manually selected mountain ranges. Only needed when range_selection is set to manual. Default is set to NULL

Value

The input xy_dataframe with an additional column "GMBA_V2_ID", containing the GMBA Inventory v2.0 mountain range IDs associated with the respective input point coordinate. In case a point coordinate is located in more than one mountain polygon (cross-scale), they are given as a collapsed character string, separated by comma. If a point coordinate does not lie within a mountain range polygon, an NA is returned

Examples

## Not run: 
rangeid_vector <- gmba_ids_from_points(xy, "300")
rangeid_vector <- gmba_ids_from_points(xy, "manual", c("11175", "10001"))
rangeid_vector <- gmba_ids_from_points(xy, "manual",
                                       gmba_ids_from_names(c("Black Forest", "European Alps")))

## End(Not run)

GMBA-biodiversity/gmbaR documentation built on Feb. 13, 2025, 8:44 a.m.