great_circle_raster {gaiah} | R Documentation |
return a raster of great circle distances (in km)
Description
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.
Usage
great_circle_raster(R, lat, long)
Arguments
R |
a raster |
lat |
a latitude value (must be of length 1) |
long |
a longitude value (must be of length 1) |
Examples
# 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)
[Package gaiah version 0.0.5 Index]