lonlatFromCell: Raster cell longitude and latitudes

View source: R/Raster.R

lonlatFromCellR Documentation

Raster cell longitude and latitudes

Description

Extract longitude and latitude of raster cells.

Usage

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.


SWotherspoon/SGAT documentation built on June 1, 2022, 10:49 p.m.