Im wondering if someone has built a raster of the continents of the world where each cell equals the distance of that cell cell to the nearest shore. This map would highlight the land areas that are most isolated inland.
I would imagine this would simply rasterize
a shapefile of the global boundaries and then calculate the distances.
You can do this with
raster::distance
, which calculates the distance from eachNA
cell to the closest non-NA
cell. You just need to create a raster that hasNA
for land pixels, and some other value for non-land pixels.Here's how:
To create the plot above (I like
rasterVis
for plotting, but you could useplot(r)
):