monitor_distance: Calculate distances from monitors to a location of interest

Description Usage Arguments Value See Also Examples

View source: R/monitor_distance.R

Description

This function returns the distances (km) between monitoring sites and a location of interest. These distances can be used to create a mask identifying monitors within a certain radius of the location of interest.

Usage

1
monitor_distance(ws_monitor, longitude, latitude)

Arguments

ws_monitor

ws_monitor object

longitude

longitude of the location of interest

latitude

latitude of the location of interest

Value

Vector of of distances (km).

See Also

distance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(PWFSLSmoke)

N_M <- Northwest_Megafires
# Walla Walla
WW_lon <- -118.330278
WW_lat <- 46.065
distance <- monitor_distance(N_M, WW_lon, WW_lat)
closestIndex <- which(distance == min(distance))
distance[closestIndex]
N_M$meta[closestIndex,]

PWFSLSmoke documentation built on Nov. 23, 2021, 5:06 p.m.