arc2r / book

Work in Progress: A resource for people transitioning from ArcGIS to R for spatial stuff
https://arc2r.github.io/book/
12 stars 4 forks source link

use a raster object with the same extent as the sf object #103

Open github-actions[bot] opened 3 years ago

github-actions[bot] commented 3 years ago

use a raster object with the same extent as the sf object

https://github.com/arc2r/book/blob/055b1a09fa2b4f7fa6d624bee5681c7445cb912f/01_Making_Maps/Static_Maps.Rmd#L107

``####raster` objects

While sf objects are very easily integrated in ggplot2, raster data is a little harder. There are various ways to plot a raster object with ggplot2. A simple, adhoc approach is converting the RasterLayer object into a data.frame and then plotting it with geom_raster.



60ab80a7713d6dec767ee899ebdad3e045a82e66