coordID2coord: Transform plot ID to coordinates

View source: R/coordID2coord.R

coordID2coordR Documentation

Transform plot ID to coordinates

Description

The function transforms the plot ID (that consits of 6 digits) to a tibble of class sf with a geometry that contains the points in Swiss grid projection (old or new) or WGS projection. The latter can be used to plot the points on a leaflet (see examples).

Usage

coordID2coord(coordID, Z7 = TRUE, projection = "CH-old")

Arguments

coordID

Vector with plot coordinates

Z7

Logical

projection

What projection should be used for the coordinates. One of

  1. CH-old: Old Swiss-grid

  2. CH-new: New Swiss-grid

  3. WGS: WGS grid (e.g. to be used for leaflets, see example)

Value

Coordinates of sampling locations as SpatialPoints of package sp.

Examples

require(leaflet)
tmp <- coordID2coord(coordID = c(645260), Z7 = FALSE, projection = "WGS")
leaflet() %>% 
  addTiles() %>% 
  addCircles(data = tmp)


TobiasRoth/BDM documentation built on June 12, 2024, 7:16 a.m.