lnglat2gridcell | R Documentation |
The function returns the grid identifier based on a longitude and latitude coordinate pair.
lnglat2gridcell(x, y)
x |
Longitude in decimal degrees. |
y |
Latitude in decimal degrees. |
A character
vector.
Roland Kaiser
Niklfeld, H. (1971): Bericht über die Kartierung der Flora Mitteleuropas. Taxon 20: 545-571.
floragrid
, gridcell2lnglat
lnglat2gridcell(13, 47)
data(sbg)
xy <- coordinates(sbg)
d <- data.frame(t(apply(xy, 1, function (x) lnglat2gridcell(x[ 1 ], x[ 2 ]) ) ),
stringsAsFactors = FALSE)
all(as.character(sbg$GRIDCELL) == as.character(d$GRIDCELL))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.