Skip to contents

Usage

latlon_is.islandareas(lat, lon, exact_but_slow_islandareas = FALSE)

Arguments

lat

vector of latitudes

lon

vector of longitudes

exact_but_slow_islandareas

optional logical, set it to TRUE to check each point vs boundaries in states_shapefile to identify which ones are in Island Areas according to that shapefile. The default method here is much faster, but just checks if a point is within a bounding box that should approximate each of the Island Areas, found in the object islandareas.

Value

vector of TRUE / FALSE values indicating a given lat lon pair is approximately in one of the rough bounding boxes that includes the 4 Island Areas.

Examples

# \donttest{
# this would require the testpoints_1000 data from the EJAM package:
  isles <- which(latlon_is.islandareas(lat = testpoints_1000$lat, lon = testpoints_1000$lon))
#> Error in latlon_is.islandareas(lat = testpoints_1000$lat, lon = testpoints_1000$lon): could not find function "latlon_is.islandareas"
  mapfast(testpoints_1000[isles, ]) # c(213,785)
#> Error: object 'isles' not found
  which(!(latlon_is.usa(lat = testpoints_1000$lat, lon = testpoints_1000$lon)))
#> Error in latlon_is.usa(lat = testpoints_1000$lat, lon = testpoints_1000$lon): could not find function "latlon_is.usa"
# }