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.

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

Examples

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]
#> 530710005_01 #> 1.771494
N_M$meta[closestIndex,]
#> monitorID longitude latitude elevation timezone #> 530710005_01 530710005_01 -118.3514 46.0588 266.9 America/Los_Angeles #> countryCode stateCode siteName #> 530710005_01 US WA Walla Walla-12th St #> agencyName countyName msaName #> 530710005_01 Washington Department of Ecology WALLA WALLA Walla Walla, WA #> monitorType siteID instrumentID aqsID pwfslID #> 530710005_01 <NA> 530710005 01 530710005 <NA> #> pwfslDataIngestSource telemetryAggregator telemetryUnitID #> 530710005_01 <NA> <NA> <NA>