Metadata-Version: 2.4
Name: aviconv-aixm
Version: 0.6.0
Summary: AIXM 5.1.1/5.2 dataset reader (5.1.1 writer) with GeoJSON, AIRAC diff, and temporality flattener.
Project-URL: Homepage, https://github.com/ams-mmd/aviconv
Project-URL: Documentation, https://ams-mmd.github.io/aviconv/
Project-URL: Source, https://github.com/ams-mmd/aviconv
Project-URL: Issues, https://github.com/ams-mmd/aviconv/issues
Author: aviconv contributors
License: MIT
Keywords: aip,airac,aixm,aviation,eurocontrol,faa,geojson,icao
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: aviconv-core<0.1,>=0.0.3
Requires-Dist: click>=8.1
Requires-Dist: lxml>=5.2
Requires-Dist: pydantic>=2.7
Requires-Dist: shapely>=2.0
Requires-Dist: xmlschema>=3.3
Description-Content-Type: text/markdown

# aviconv-aixm

**AIXM 5.1.1 and 5.2** reader (write stays 5.1.1) for full AIP
datasets, plus GeoJSON export, AIRAC-cycle diff, and a temporality
flattener that materialises a snapshot at any date `T`.

Part of the [aviconv](https://github.com/ams-mmd/aviconv) monorepo.

## Install

```bash
pip install aviconv-aixm
```

This pulls in `aviconv-core` (shared XML / coords / errors) and brings
the `aviconv aixm …` subcommands under the umbrella `aviconv` CLI.

## Status

- v0.6.0 covers the AIP feature core: AirportHeliport, Runway,
  RunwayDirection, Navaid (VOR/DME/NDB/ILS/TACAN), DesignatedPoint,
  Airspace + AirspaceVolume, Route + RouteSegment, Procedure
  (envelope), Obstacle, Organisation, Unit.
- **Version support:** reads both AIXM 5.1.1 and 5.2 (`version="auto"`
  by default, sniffed from the document's namespace) into the same
  typed model — no property renames between the two dialects across
  any modelled feature type. The **writer stays 5.1.1-only**; there is
  no version-conversion feature. See the
  [docs](https://ams-mmd.github.io/aviconv/aixm/#aixm-version-support)
  for the full support matrix.
- TaxiwayElement, ApronElement, full Procedure leg algebra, and the
  ADR-23.5.0 extension surface are deferred to a future release.
- Streaming reader (constant memory on 100MB+ datasets) via
  `lxml.iterparse`. Writer streams via `lxml.etree.xmlfile`.

## Library

```python
from aviconv_aixm import (
    read_aixm, read_aixm_dataset,
    write_aixm,
    to_geojson,
    diff_datasets,
    snapshot_at,
)

# Stream features one at a time (constant memory on 100MB+ inputs)
for feature in read_aixm("aip.xml"):
    print(feature.gml_identifier.value, type(feature).__name__)

# Materialise the whole dataset (random access for diff/flatten)
ds = read_aixm_dataset("aip.xml")
print(len(ds.features), "features")
```

## CLI

```bash
aviconv aixm parse      aip.xml > aip.ndjson
aviconv aixm to-aixm    aip.ndjson -o roundtrip.xml
aviconv aixm to-geojson aip.xml -o aip.geojson
aviconv aixm diff       cycle_2603.xml cycle_2604.xml --format json
aviconv aixm flatten    aip.xml --at 2026-05-09T00:00Z -o snapshot.xml
aviconv aixm validate   aip.xml --strict

# --version [auto|5.1.1|5.2] on every read-side subcommand (not to-aixm):
aviconv aixm parse aip_5.2.xml --version 5.2 > aip.ndjson
```

## Round-trip semantics

AIXM round-trip is **field-level**, not byte-stable: namespace prefix
choices and `gml:id` values are intentionally not preserved on read.
`gml:identifier` (the stable feature ID) **is** preserved, as are all
modelled feature properties and time-slice metadata.

## Licence

MIT. The vendored AIXM 5.1.1 / GML 3.2.1 / ISO 19139 / xlink schemas
retain their upstream licences — see `LICENSES/`.
