Is a coordinate inside a bounding box?
Arguments
- lat
Numeric vector of latitudes.
- lon
Numeric vector of longitudes.
- bbox
A named bounding box as returned by
region_bbox()or supplied by the caller.
Examples
in_bbox(40.2, -74.5, region_bbox("NJ"))
#> [1] TRUE
in_bbox(40.5, -104.9, region_bbox("NJ")) # a Colorado false-match
#> [1] FALSE
