lnglat2gridcell: Query Coordinates for Grid Identifier

lnglat2gridcellR Documentation

Query Coordinates for Grid Identifier

Description

The function returns the grid identifier based on a longitude and latitude coordinate pair.

Usage

lnglat2gridcell(x, y)

Arguments

x

Longitude in decimal degrees.

y

Latitude in decimal degrees.

Value

A ⁠character⁠ vector.

Author(s)

Roland Kaiser

References

Niklfeld, H. (1971): Bericht über die Kartierung der Flora Mitteleuropas. Taxon 20: 545-571.

See Also

floragrid, gridcell2lnglat

Examples

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))

kardinal-eros/sabotag-tools documentation built on Feb. 6, 2025, 1:12 a.m.