rasterToPoints.Rd
Raster to point conversion. Cells with NA are not converted. A function can be used to select a subset of the raster cells (by their values).
rasterToPoints(x, fun=NULL, spatial=FALSE, ...)
A Raster* object
Function to select a subset of raster values
Logical. If TRUE
, the function returns a SpatialPointsDataFrame object
Additional arguments. Currently only progress
to specify a progress bar. "text", "window", or "" (the default, no progress bar)
fun
should be a simple function returning a logical value.
E.g.: fun=function(x){x==1}
or fun=function(x){x>3}
A matrix with three columns: x, y, and v (value), or a SpatialPointsDataFrame object