great_circle_raster: return a raster of great circle distances (in km)

View source: R/assess.R

great_circle_rasterR 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)

gaiah documentation built on April 28, 2023, 1:11 a.m.