O'Reilly logo

Learning R for Geospatial Analysis by Michael Dorman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extracting raster values based on vector layers

So far, we have covered operations to transform a vector layer to a raster and vice versa. The third operation involving vector layers and rasters, and the focus of this final section, is the extraction of raster values according to vector layers. We are often interested in reducing or summarizing raster data using point, line, or polygon features, which is when this operation comes in handy. For example, we may wish to calculate the elevation profile covered by a GPS track (raster-to-line extraction) or the average NDVI of a given forest (raster to polygon extraction). In this section, we will see two examples involving extraction by points and extraction by polygons.

Extracting by points

Extraction ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required