Metadata-Version: 2.4
Name: aviconv-aixm
Version: 0.4.0
Summary: Bidirectional AIXM 5.1.1 dataset reader/writer with GeoJSON, AIRAC diff, and temporality flattener.
Project-URL: Homepage, https://github.com/ams-dev25/aviconv
Project-URL: Documentation, https://ams-dev25.github.io/aviconv/
Project-URL: Source, https://github.com/ams-dev25/aviconv
Project-URL: Issues, https://github.com/ams-dev25/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.2
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

Bidirectional **AIXM 5.1.1** reader/writer 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-dev25/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.4.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.
- TaxiwayElement, ApronElement, full Procedure leg algebra, and the
  ADR-23.5.0 extension surface are deferred to 0.4.x.
- 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
```

## 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/`.
