great_circle_raster | R Documentation |
Given an input raster R, this returns a raster of the same dimension where every cell is the great circle distance between lat, and long, and the center of every cell in R.
great_circle_raster(R, lat, long)
R |
a raster |
lat |
a latitude value (must be of length 1) |
long |
a longitude value (must be of length 1) |
# We compute the great circle distance between the lat/long of my office in
# California, to every cell in the raster denoting the breeding habitat
# of Wilson's warbler:
gcr <- great_circle_raster(wiwa_breed, lat = 36.951564, long = -122.065116)
# plot that if you want
## Not run:
plot(gcr)
lines(get_wrld_simpl())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.