![]() ![]() Country boundaries can be loaded from rnaturalearth. These are the main steps in the process: Load raster and polygon dataįirst, read_stars() can read the geotiff raster file into a stars object and st_read() to load the shapefile. All the required packages can be installed from CRAN, so this example can be reproduced by everyone (willing to download these large amounts of data). (2016), and a multipolygon shapefile of mammalian distribution maps downloaded from the IUCN Red List Spatial Data and Mapping Resources page (free & open download for educational use but an account is needed). We use a single raster file with gridded values for the Human Footprint index (a compound measure of direct and indirect human pressures on the environment globally), calculated for 2009 by Venter et al. shp file into a simple feature collection. ![]() ![]() #Raster in r updateThis is an update to a previous Spanish-language post for working with spatial raster and vector data in R, prompted by recent developments such as the stars package, its integration with sf and raster, and a particularly useful wrapper in geobgu.Įxtracting the underlying values from a raster is a fairly common task, so here is a workflow to calculate and extract values (mean, max, min, etc.) from a raster file across the distribution of a few different primate species in Mexico and Central America (“Mesoamerica”), loaded from a. Update - January 2020: The raster_ functions from nngeo were moved to geobgu. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |