Title: | The Atlas and Utilities for PRU Maps |
---|---|
Description: | A set of utilities for creation of map as used in PRU documents and portal. |
Authors: | Enrico Spinielli [aut, cre] |
Maintainer: | Enrico Spinielli <[email protected]> |
License: | GPL-2 | MIT + file LICENSE |
Version: | 0.0.2.0 |
Built: | 2025-02-23 06:18:44 UTC |
Source: | https://github.com/euctrl-pru/pruatlas |
A dataset containing the definition of the ANSPs as used in the ACE Benchmarking Report.
ansps_ace_406
ansps_ace_406
A Simple Feature dataset with airspace definitions for ANSPs:
the AIRAC cycle number in CFMU format
the ID for the ANSP
the name of the ANSP
the code of the ANSP used in ACE
the minimum flight level of the ANSP
the maximum flight level of the ANSP
the type of the airspace (ANSP)
the Simple Feature describing the ANSP
https://github.com/euctrl-pru/eurocontrol-atlas
Provide base country layer for PRU maps.
base_map( colour_sea = "#D8F4FF", colour_land = "grey89", colour_border = "#A9A9A9", colour_graticule = "#D3D3D3", colour_backgroud = "#f5f5f2", border_size = 0.2 )
base_map( colour_sea = "#D8F4FF", colour_land = "grey89", colour_border = "#A9A9A9", colour_graticule = "#D3D3D3", colour_backgroud = "#f5f5f2", border_size = 0.2 )
colour_sea |
colour of the sea |
colour_land |
colour of the land |
colour_border |
colour of the country border |
colour_graticule |
colour of the graticule |
colour_backgroud |
background colour |
border_size |
thickness of the border line |
a ggplot2 object with world countries in LAEA projection.
## Not run: library(pruatlas) # Plot a world map in LAEA projection. bm <- base_map() ## End(Not run)
## Not run: library(pruatlas) # Plot a world map in LAEA projection. bm <- base_map() ## End(Not run)
A dataset containing the definition of the world countries.
countries50m
countries50m
A Simple Feature dataset with 240 countries and 4 variables:
ISO 3166-1 alpha-3 three-letter country code
ISO 3166-1 numeric three digits country code
Country's English short name according to ISO 3166
the Simple Feature describing the country
https://github.com/euctrl-pru/eurocontrol-atlas
Extract ANSP polygon at defined flight level
country_ansp(ansps, ansp_id = "ENAV", fl = 300)
country_ansp(ansps, ansp_id = "ENAV", fl = 300)
ansps |
the |
ansp_id |
optional, the ANSP ID of the relevant country, "ENAV" otherwise. It can be a regular expression, i.e. "DFS|ENAV" for matching Germany and Italy. |
fl |
the flight level of interest |
a polygon for the ANSP(s)
## Not run: country_ansp(ansps_ace_406, "DFS", fl = 350) # more complicated for Italy/ENAV: there is a hole over Rome. # if we want to get rid of it we can use smoothr::fill_holes() enav <- pruatlas::ansps_ace_406 %>% country_ansp(ansp_id = "ENAV", fl = 355) %>% smoothr::fill_holes(units::set_units(10000, km^2)) ## End(Not run)
## Not run: country_ansp(ansps_ace_406, "DFS", fl = 350) # more complicated for Italy/ENAV: there is a hole over Rome. # if we want to get rid of it we can use smoothr::fill_holes() enav <- pruatlas::ansps_ace_406 %>% country_ansp(ansp_id = "ENAV", fl = 355) %>% smoothr::fill_holes(units::set_units(10000, km^2)) ## End(Not run)
Return the country FIR for a EUROCONTROL's Member State.
country_fir(firs, icao_id = "LI", fl = 0, merge = TRUE, exclude = NULL)
country_fir(firs, icao_id = "LI", fl = 0, merge = TRUE, exclude = NULL)
firs |
the relevant NM FIRs. |
icao_id |
optional, the ICAO ID of the relevant country, "LI" otherwise. It can be a regular expression, i.e. "LI|LF" for matching France and Italy. |
fl |
flight level at which assemble the composing polygons. |
merge |
Do you want to merge? (Default: TRUE). |
exclude |
List of IDs to filter out. It can be useful to use when only continental portion of FIR is of interest, i.e. exclude SANTA MARIA FIR for Portugal. |
An Simple Feature for the relevant country FIR.
## Not run: # France country_fir(pruatlas::firs_nm_406, "LF") # EUROCONTROL's Member States country_fir(pruatlas::firs_nm_406, icao_id = "E.|L.|UD|UG|GM|UK|GC") # Consider only continental portion of Portugal FIR country_fir(pruatlas::firs_nm_406, icao_id = "LP", exclude = c("LPPOFIR")) ## End(Not run)
## Not run: # France country_fir(pruatlas::firs_nm_406, "LF") # EUROCONTROL's Member States country_fir(pruatlas::firs_nm_406, icao_id = "E.|L.|UD|UG|GM|UK|GC") # Consider only continental portion of Portugal FIR country_fir(pruatlas::firs_nm_406, icao_id = "LP", exclude = c("LPPOFIR")) ## End(Not run)
STATFOR ECAC North East region
ecac_northeast(firs = pruatlas::firs_nm_406)
ecac_northeast(firs = pruatlas::firs_nm_406)
firs |
the global FIRs |
the FIR-based STATFOR ECAC North East region
## Not run: ecac_northeast() ## End(Not run)
## Not run: ecac_northeast() ## End(Not run)
STATFOR ECAC North West region
ecac_northwest(firs = pruatlas::firs_nm_406)
ecac_northwest(firs = pruatlas::firs_nm_406)
firs |
the global FIRs |
the FIR-based STATFOR ECAC North West region
## Not run: ecac_northwest() ## End(Not run)
## Not run: ecac_northwest() ## End(Not run)
STATFOR ECAC Oceanic region
ecac_oceanic(firs = pruatlas::firs_nm_406)
ecac_oceanic(firs = pruatlas::firs_nm_406)
firs |
the global FIRs |
the FIR-based STATFOR ECAC Oceanic region
## Not run: ecac_oceanic() ## End(Not run)
## Not run: ecac_oceanic() ## End(Not run)
STATFOR ECAC region
ecac_region(firs = pruatlas::firs_nm_406)
ecac_region(firs = pruatlas::firs_nm_406)
firs |
the global FIRs |
the FIR-based STATFOR ECAC region
## Not run: ecac_region() ## End(Not run)
## Not run: ecac_region() ## End(Not run)
STATFOR ECAC South East region
ecac_southeast(firs = pruatlas::firs_nm_406)
ecac_southeast(firs = pruatlas::firs_nm_406)
firs |
the global FIRs |
the FIR-based STATFOR ECAC South East region
## Not run: ecac_southeast() ## End(Not run)
## Not run: ecac_southeast() ## End(Not run)
STATFOR ECAC South West region
ecac_southwest(firs = pruatlas::firs_nm_406)
ecac_southwest(firs = pruatlas::firs_nm_406)
firs |
the global FIRs |
the FIR-based STATFOR ECAC South West region
## Not run: ecac_southhwest() ## End(Not run)
## Not run: ecac_southhwest() ## End(Not run)
Return the extent of a set of FIRs.
extent_fir(firs, crs)
extent_fir(firs, crs)
firs |
the relevant NM FIRs. |
crs |
the |
A data frame of the extent of the input data.
## Not run: crs <- sf::st_crs(3035) extent_fir(firs_nm_406, crs) ## End(Not run)
## Not run: crs <- sf::st_crs(3035) extent_fir(firs_nm_406, crs) ## End(Not run)
A dataset containing the definition of the FIRs as used by the Network Manager.
firs_nm_406
firs_nm_406
A Simple Feature dataset with 111 FIRs and 9 variables:
the AIRAC cycle number in CFMU format
the ICAO region code for the FIR
the ID for the FIR
the minimum flight level of the FIR
the maximum flight level of the FIR
the name of the FIR
the type of the airspace (FIR)
the Simple Feature describing the FIR
A dataset containing the definition of the FIRs as used by the Network Manager.
firs_nm_481
firs_nm_481
A Simple Feature dataset with 111 FIRs and 9 variables:
the AIRAC cycle number in CFMU format
the ICAO region code for the FIR
the ID for the FIR
the minimum flight level of the FIR
the maximum flight level of the FIR
the name of the FIR
the type of the airspace (FIR)
the Simple Feature describing the FIR
A data frame with the following fields
the country name, e.g. "Italy"
the 3-letter ISO code, e.g. "ITA"
the 2-letter ISO code, e.g. "IT"
the 2-letter ICAO code, e.g. "LI"
the 3-digits ISO code, e.g. "380"
the date of status
code, e.g. 1996-04-01
the status code, e.g. "M"
(M
Member State, C
Comprehensive Agreement State, T
Transitional State)
These are useful to grab the right spatial polygons in case of need. Note: Kosovo is also included in the list.
member_states
member_states
An object of class tbl_df
(inherits from tbl
, data.frame
) with 45 rows and 7 columns.
STATFOR North Atlantic region
north_atlantic(firs = pruatlas::firs_nm_406)
north_atlantic(firs = pruatlas::firs_nm_406)
firs |
the global FIRs |
the FIR-based STATFOR North Atlantic
## Not run: north_atlantic() ## End(Not run)
## Not run: north_atlantic() ## End(Not run)
parse_airspace_crco
reads the airspace CRCO format and returns a tibble
where each row describes an airspace.
The airspace file can be found on EUROCONTROL website.
Each airspace in CRCO format is described by:
Airspace description (one row):
nb_point
the number of points
latitude
the latitude (of the label)
longitude
the longitude (of the label)
flights
bottom_level
low level of the volume (flight level)
top_level
high level of the volume (flight level)
surface
sector_num
flight time
traffic density
x mileage
rte extens.
value 1
value 2
name
airspace name/code
latitude
longitude
: coordinates (nb_point
rows in minutes decimal)
parse_airspace_crco(lines)
parse_airspace_crco(lines)
lines |
text lines of the PRISME airspace representation |
a tibble of airspaces (CRS = 4326)
## Not run: bo <- system.file("extdata", "sbm_bz_20200527.txt", package = "pruatlas") crco <- readr::read_lines(bo) %>% parse_airspace_crco() ## End(Not run)
## Not run: bo <- system.file("extdata", "sbm_bz_20200527.txt", package = "pruatlas") crco <- readr::read_lines(bo) %>% parse_airspace_crco() ## End(Not run)
Plot country and relevant ANSP.
plot_country_ansp( ansp_id, name, fl = 300, buffer = 100, ansps = pruatlas::ansps_ace_406 )
plot_country_ansp( ansp_id, name, fl = 300, buffer = 100, ansps = pruatlas::ansps_ace_406 )
ansp_id |
optional, the ANSP ID of the relevant country, "ENAV" otherwise. It can be a regular expression, i.e. "DFS|ENAV" for matching Germany and Italy. |
name |
The name used to title the plot. |
fl |
the flight level of interest |
buffer |
Buffer around ANSP (km) |
ansps |
the |
A ggplot object with country and relevant ANSP.
## Not run: plot_country_ansp("DFS", "Germany") # Italy'ENAV has a hole above Rome... plot_country_ansp("ENAV", "Italy (hole over Rome)") # ...filling the hole, manually enav <- pruatlas::ansps_ace_406 %>% country_ansp(ansp_id = "ENAV", fl = 355) %>% dplyr::mutate(min_fl = 355, max_fl = 355, id = "ENAV") %>% smoothr::fill_holes(units::set_units(10000, km^2)) plot_country_ansp(ansp_id = "ENAV", name = "Italy", fl = 355, ansps = enav) ## End(Not run)
## Not run: plot_country_ansp("DFS", "Germany") # Italy'ENAV has a hole above Rome... plot_country_ansp("ENAV", "Italy (hole over Rome)") # ...filling the hole, manually enav <- pruatlas::ansps_ace_406 %>% country_ansp(ansp_id = "ENAV", fl = 355) %>% dplyr::mutate(min_fl = 355, max_fl = 355, id = "ENAV") %>% smoothr::fill_holes(units::set_units(10000, km^2)) plot_country_ansp(ansp_id = "ENAV", name = "Italy", fl = 355, ansps = enav) ## End(Not run)
Plot country and relevant FIR.
plot_country_fir( icao_id, name, fl = 0, buffer = 100, firs = pruatlas::firs_nm_406, merge = TRUE )
plot_country_fir( icao_id, name, fl = 0, buffer = 100, firs = pruatlas::firs_nm_406, merge = TRUE )
icao_id |
optional, the ICAO ID of the relevant country, "LI" otherwise. It can be a regular expression, i.e. "LI|LF" for matching France and Italy. |
name |
The name used to title the plot. |
fl |
flight level at which assemble the composing polygons. |
buffer |
Buffer around FIR (km) |
firs |
the relevant NM FIRs. |
merge |
Do you want to merge (default: TRUE) |
A ggplot object with country and relevant FIR.
## Not run: plot_country_fir("LI", "Italy") # UK and Portugal have oceanic part... plot_country_fir("EG", "United Kingdom (oceanic)") # decoupling oceanic, manually uk_continental <- firs_nm_406 %>% dplyr::filter(icao == "EG", min_fl <= 0, 0 <= max_fl) %>% dplyr::filter(!(id %in% c("EGGXFIR", "EGGX"))) plot_country_fir("EG", "United Kingdom (continental)", firs = uk_continental) # EUROCONTROL plot_country_fir(icao_id = "E.|L.|UD|UG|GM|UK|GC", "EUROCONTROL Member States", buffer = 350, fl = 200) ## End(Not run)
## Not run: plot_country_fir("LI", "Italy") # UK and Portugal have oceanic part... plot_country_fir("EG", "United Kingdom (oceanic)") # decoupling oceanic, manually uk_continental <- firs_nm_406 %>% dplyr::filter(icao == "EG", min_fl <= 0, 0 <= max_fl) %>% dplyr::filter(!(id %in% c("EGGXFIR", "EGGX"))) plot_country_fir("EG", "United Kingdom (continental)", firs = uk_continental) # EUROCONTROL plot_country_fir(icao_id = "E.|L.|UD|UG|GM|UK|GC", "EUROCONTROL Member States", buffer = 350, fl = 200) ## End(Not run)
Default colours for PRU maps.
pru_colours()
pru_colours()
The colours for the various elements of a map, i.e. see, land, fir, ...
The pruatlas package provides function to plot country FIRs, access the underlying FIR or country spatial definitions.
The pruatlas package provides three sets of functions, one for plottting,
the second for accessing the underlying datasets and the last is about helper
functions.
For example plot_coutry_fir
is an high level function that plots the FIR at
the country level.
list/define the colours of the maps (currently hardcoded)
provide FIRs for other AIRAC's (separate data packages? lazy-loading of data?)
define a function to convert from CFMU AIRAC format to AIP format
change airacnm
to the AIP format
Return the polygon represent the spherical Earth.
sphere(crs = pruatlas::pru_laea_proj)
sphere(crs = pruatlas::pru_laea_proj)
crs |
a |
A Simple Feature representing the spherical contour of the Earch in the relevant projection.
A special object to represent the spherical Earth in a given projection.
sphere_laea
sphere_laea
An object of class sf
(inherits from data.frame
) with 1 rows and 2 columns.
https://github.com/euctrl-pru/eurocontrol-atlas
http://stackoverflow.com/q/43207947/963575
A clean theme for displaying maps.
theme_map(base_size = 9, base_family = "", ...)
theme_map(base_size = 9, base_family = "", ...)
base_size |
base font size, given in pts. |
base_family |
base font family |
... |
other theme parameters |