Skip to content
Prev 14882 / 29559 Next

Raster to points

On Sat, Apr 21, 2012 at 3:21 PM, Tim Appelhans <tim.appelhans at gmail.com> wrote:
Except the function doesn't apply to rasters, by which I mean objects
from the raster package.

If you have:

dem = raster("dem.tif")
pts = readShapeSpatial("pts.shp")

then extract(dem,pts) will return the values of the dem raster at the
locations of  the points in pts.

No need to use GRASS or QGIS for this.

Barry