lonlatFromCell: Raster cell longitude and latitudes

Description Usage Arguments Details Value

Description

Extract longitude and latitude of raster cells.

Usage

1
2
3
lonlatFromCell(raster, cells, spatial = FALSE)

cellFromLonLat(raster, pts)

Arguments

raster

a raster object

cells

the cell numbers

spatial

return locations as SpatialPoints object instead of a matrix.

pts

the lon, lat locations as a 2 column matrix

Details

Extract the longitude and latitude of the center of the requested cells of a Raster* object, similar to xyFromCell and cellFromXY.

Value

lonlatFromCell returns the lon,lat locations for the requested cells as a 2 column matrix, and cellFromLonLat returns the cells corresponding to the 2 column matrix of lon,lat positions.


KateGoodenough/RoL-SGAT documentation built on June 11, 2019, 1:29 p.m.