| aoi | R Documentation |
Functions that set, view and get a session-wide area of interest (AOI) that can be used by all getSpatialData functions.
set_aoi(aoi) view_aoi(aoi = NULL, aoi_colour = "deepskyblue", ...) get_aoi(type = "sf")
aoi |
sfc_POLYGON or SpatialPolygons or matrix, representing a single multi-point (at least three points) polygon of your area-of-interest (AOI). If it is a matrix, it has to have two columns (longitude and latitude) and at least three rows (each row representing one corner coordinate). If its projection is not |
aoi_colour |
chracter, AOI colour. |
... |
deprecated arguments |
type |
character, AOI object type, either "matrix", "sf" or "sp". |
set_aoi defines a session AOI that is used for querying data within the running session (if no other AOI is provided with a query function call). If called without argument, an interactive mapedit viewer is opened letting you draw an AOI polygon. Otherwise, the function supports sf, sp or matrix objects as aoi input (see argument aoi).
view_aoi displays the defined session AOI on an interactive mapview/leaflet map.
get_aoi returns the defined session AOI.
Jakob Schwalb-Willmann
get_records
## set aoi (example aoi)
data("aoi_data")
set_aoi(aoi_data[[1]])
## Not run:
## draw aoi interactively
set_aoi() # just call without an argument
## view aoi
view_aoi()
## return aoi
aoi <- get_aoi(type = "sf")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.