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

Description Usage Arguments Examples

View source: R/assess.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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 July 8, 2020, 6:12 p.m.