distanceFromPoints

0th

Percentile

Distance from points

The function calculates the distance from a set of points to all cells of a RasterLayer. The distance unit is in meters if the RasterLayer is not projected (+proj=longlat) and in map units (typically meters) when it is projected.

Keywords
spatial
Usage
distanceFromPoints(object, xy, filename='', ...)
Arguments
object
Raster object
xy
matrix of x and y coordinates, or a SpatialPoints* object.
filename
character. Optional filename for the output RasterLayer
...
Additional arguments as for writeRaster
Value

See Also

distance, gridDistance, pointDistance

Aliases
  • distanceFromPoints
Examples
r <- raster(ncol=36,nrow=18)
xy = c(0,0)
dist <- distanceFromPoints(r, xy) 
#plot(dist)
Documentation reproduced from package raster, version 2.5-8, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.