coordID2coord: Transform plot ID to coordinates

Description Usage Arguments Value Examples

View source: R/coordID2coord.R

Description

The function transforms the plot ID (that consits of 6 digits) to Spatialpoints 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

1
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

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

TobiasRoth/BDM documentation built on May 6, 2019, 8:32 p.m.