makesq | R Documentation |
The function transforms the site ID (that consits of 6 digits and points to the SW corner of the square) to a tibble with class sf and a polygon as a geometry. The polygon is a square with a given sidelength in meter. The projection is eiter a the Swiss projection (old or new) or WGS projection. The latter can be used to plot the points on a leaflet (see examples).
makesq(coordID, projection = "CH-old", sidelength = 1000)
coordID |
Vector or tibble with site site-IDs. If a tibble, the column with the site-IDs should be named as "aID_STAO". |
projection |
What projection should be used for the coordinates. One of
|
sidelength |
The sidelength (in m) of the squares. |
Tibble of class sf
with a geometry that describes the sampling
squares.
require(leaflet)
tmp <- makesq(coordID = c(645260), projection = "WGS")
leaflet() %>%
addTiles() %>%
addPolygons(data = tmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.