find_locs: Find locations of stations/etc. from spatial inputs

Description Usage Arguments Examples

View source: R/find_locs_faster.R

Description

Find locations of stations/etc. from spatial inputs

Usage

1
find_locs(x, lat = NULL, lon = NULL, radius = NULL, bbox = NULL)

Arguments

x

The reference set of stations. This is in the case of point data, not gridded data

lat, lon

(numeric) Latitude and longitude, in decimal degree. One or more. The lat and lon vectors must be the same length.

radius

(numeric) Radius (in km) to search from the lat,lon coordinates

bbox

(numeric) Bounding box, of the form: min-longitude, min-latitude, max-longitude, max-latitude. IGNORED FOR NOW.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# Single point pair
x <- rnoaa::isd_stations()
find_locs(x, lat = 40, lon = -120, radius = 50)

# Many point pairs
x <- rnoaa::isd_stations()
find_locs(x, lat = c(30, 40), lon = c(-120, -120), radius = 50)

## End(Not run)

ropenscilabs/spenv documentation built on Sept. 22, 2020, 4:46 p.m.