Description Usage Arguments Value Author(s) References See Also Examples
The function returns the grid identifier based on a longitude and latitude coordinate pair.
1 | 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.
1 2 3 4 5 6 7 8 | 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.