Skip to content

feat(data): read AIXM 5.1/5.2 aeronautical data at an effective date (#2077) - #2819

Closed
flight1973 wants to merge 62 commits into
opengeos:mainfrom
flight1973:feat/2077-aixm
Closed

flight1973 wants to merge 62 commits into
opengeos:mainfrom
flight1973:feat/2077-aixm

Conversation

@flight1973

@flight1973 flight1973 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2077.

This adds a reader for AIXM 5.1, 5.1.1 and 5.2 messages, and for the FAA's 28-day NASR subscriber files of AIXM 5.1. Add Data opens them as .xml or .gml, by their root.

What it does

  • Reads each feature as it is on one effective date, "at" (today when left out), from its time slices: the latest correction of each, the BASELINE in force, PERMDELTAs since, and TEMPDELTAs in force over it. Features not in force, withdrawn, canceled, given only as changes, or with a time slice that may apply on the date and can't be read (or ends before it begins, or has no period or instant of the kind it needs) are left out and counted. A feature with no BASELINE is shown as its nearest SNAPSHOT, unchanged, with a notice. This follows the AIXM Temporality Concept 1.1.
  • A layer per feature kind, and one per geometry property for a kind with several (an airport's reference point and its boundary). Runways, runway directions and routes are tables.
  • Keeps every value a feature holds, within limits on columns, nesting and memory (values past them are counted). Nested records become columns named by their path (authority_1_type), numbered when a record repeats anywhere in the layer, with units, nilReason, references (identifier and title) and other attributes. A feature whose shapes sit in records (a light system's lights, a marking's elements) gives a row per record, as an obstacle gives a row per part.
  • Arcs and circles by center or by three points are drawn on the WGS 84 ellipsoid within a meter (coarser, and said, past the file's point allowance), geodesic edges along the geodesic. ArcByCenterPoint angles follow the AIXM guidance (bearings from true north in a latitude-first system).
  • Airspace is drawn from its BASE volume, or BASE and UNION volumes as parts. One built by subtraction, intersection or from other airspace is kept without a shape and said.
  • Borders given by reference to a GeoBorder in the same file are followed. AIXM doesn't say how to cut them, so the reader takes the part between the points on the border nearest those either side, meets the next border where two join, and says so.
  • Route segments with no curve are drawn between the points they name as their pathType says (a geodesic or a rhumb line); one whose ends can't both be found is kept without a line, and said. FAA XPath references are reduced to the gml:id they name, NAD83 (CRS83) is read as WGS 84, and empty end dates are read as open, each with a notice.
  • What is left out or approximated is counted in a notice, and a clean file gives none. Known gaps: arc positions given by reference (pointProperty) are read as no positions, drawing notes are also counted for rows cut by the memory cap, a feature whose only SNAPSHOT is after the date may not have existed then (said), a SNAPSHOT's period is read at its start (said) and its end isn't looked at, a service download given "at" is refused only once its pages are read, a name repeated in a file (a gml:id, which XML doesn't allow) can leave a route without a line (said), a ring naming a border by the curve of another time slice isn't drawn (said) even where that curve is the same line, the identifier and reference columns keep the file's spelling of a UUID, and a few notices are imprecise for malformed dates.
  • Hostile files: members are parsed one at a time within the usual node and namespace limits, and the points arcs add, the work of following borders and the memory rows and their paths take are all bounded by the file's size.

Tested on

  • Unit tests with two committed extracts: the fictitious Donlon 2025 sample (BSD-3-Clause) and three members of DFS's airspace data set (CC BY 4.0), both in ATTRIBUTION.md.
  • Locally, not committed: DFS airspace, routes and obstacles (12–66 MB), the Swiss obstacle file (509 MB, 8 s, 1.5 to 1.6 GB peak, about 3× the file, its own bytes included), and the FAA airports, navaid and airway files (up to 688 MB). DFS publishes its airspace twice, with borders written out and by reference. All 1,508 airspaces match between the two within 0.1% of their area.

Reaches

  • Desktop (read off the UI thread with progress and Cancel), browser, command line and Python, through Add Data and layer.addData/addUrl/addDownload/addDataText/addDataBytes, and info.fileLayers. "at" is in their parameter descriptions, so the Assistant and MCP see it, and it is passed on for a plugin's download. The phone opens the same Add Data (read as it is today). One Undo step removes the layers a message added, and Redo brings them back. "at" given for any other file is refused, not ignored. info.fileLayers reads the shapes too, so it lists what a read gives, and runs on the UI thread as it does for CityGML.
  • For every reader: a date whose offset from UTC is past 23:59 (+99:99) is no longer read as a date.
  • Not done here: a date box in the Add Data dialog (the app reads today's date; "at" works through commands), "at" for a message inside a zip (read as it is today, with its own memory allowance, as a CityGML member), and Digital NOTAM events.

Sources. AIXM Temporality Concept 1.1, the AIXM coding guidance pages on the AIXM wiki ("Arc by Centre Point", "Geoborder for Airspace Border", "Parallels", "Vertical Limits", "Multiple volumes"), the AIXM 5.1.1 schema and the GML 3.2.1 schema. I didn't follow any other project's code.

Run on my Mac, on the branch merged with main (46b071b): the whole workspace's tests, formatting, clippy, layers, attribution, rows, test-hygiene and the browser build. All pass but two tests that fail the same way on main here: mapview::tests::a_moving_flat_maps_gap_frame_is_drawn_off_the_ui_thread (#2821, under plain cargo test) and layout_title::a_wrapped_map_title_is_sized_for_its_drawn_lines, whose names measure differently in the Mac's fonts. cargo xtask memory runs on Linux only, so I haven't run it.

Screenshots are in a comment (taken before the review fixes): the Donlon sample at 2026-01-15, its airspace table, and DFS airspace whose borders follow Germany's by reference.

Summary by CodeRabbit

  • New Features
    • Added support for importing AIXM 5.1, 5.1.1, and 5.2 messages and FAA NASR files.
    • Choose an effective date to select applicable features, corrections, and time-based changes, and to list available AIXM layers.
    • AIXM imports can produce multiple layers and tables and are supported from files, text, and downloads.
    • Import reports include notices for features or geometry that could not be included. CRS overrides aren’t supported for AIXM, and effective dates aren’t supported for other formats.
  • Bug Fixes
    • Invalid timezone offsets are now rejected when parsing dates.
  • Documentation
    • Updated the supported-format list and data guide with AIXM coverage, output details, and import options.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Read AIXM 5.1/5.2 aeronautical data (airports, navaids, airspace, routes)

2 participants