Retrieve FIR (Flight Information Region) airspace geometries for a given AIRAC cycle
Source:R/airspaces.R
fir_sf.RdReturns FIR (Flight Information Region) airspace geometries as an sf object
for the specified CFMU AIRAC cycle.
An icao column is derived from the first two characters of the airspace
code.
Value
An sf object with the following columns:
airac_cfmu: the AIRAC cycle idicao: the 2-letter ICAO prefix (derived fromcode)id: the airspace volume idcode: the FIR codename: the FIR namemin_fl: the minimum flight levelmax_fl: the maximum flight levelairspace_type: the airspace type (FIR)geometry: the airspace polygon geometry
Note
You need to either provide a connection conn that has access to
ENV_SP.AIRSPACE_VOLUME, PRU_CFMU_FIR and SWH_MAP or go with the
default which uses PRU_DEV to establish a db_connection().
The sf package is required but only suggested; install it if not available.
See also
airac::cfmu_airac() from the
airac package.
Examples
if (FALSE) { # \dontrun{
firs <- fir_sf(cfmu_airac = "517")
# write to GeoJSON
sf::st_write(firs, "ir-517.geojson", driver = "GeoJSON")
# if you re-use DB connections
conn <- eurocontrol::db_connection("PRU_DEV")
firs <- fir_sf(conn = conn, cfmu_airac = "517")
# ... do something else with conn
# ...
# then manually close the connection to the DB
DBI::dbDisconnect(conn)
} # }