AIXM Reader Library

Fast, streaming AIXM 5.1/5.1.1/5.2 reader with deep geometry and relations insight.

A multiplatform library for parsing, indexing, and accessing AIXM 5.1/5.1.1/5.2 data. It turns raw AIXM messages into rich, queryable structures: feature metadata, time‑slice timelines, relation graphs, and fully computed geometries (points, lines, polygons, airspaces) – with explicit reporting of any issues encountered along the way.

Key Features

Detailed Capabilities

Streaming Indexer

Descriptor Extraction

Relations Index

Geometry Engine

Primitive Types

Point/ElevatedPoint: gml:pos, gml:pointProperty

Curve/ElevatedCurve (geometryType: linestring):

Surface/ElevatedSurface (geometryType: surface):

Airspace Geometry

Computes horizontal projections from:

Multi‑component operations:

Multipart Geometries

CRS & Antimeridian Handling

Decimation & Performance

Issue Reporting

Every failed or partial geometry is recorded as a GeometryIssue:

Multiplatform & Integration

Usage Examples

1. Index a Dataset and Compute Geometries (JVM)

val dataset = indexWithReader(
    fileSize = fileLength,
    readRange = { start, end -> readBytesFromFile(start, end) },
    computeDescriptors = true,
    descriptorConfig = defaultDescriptorConfig(),
    strategy = DescriptorStrategy.Topological,
    featureFilter = null,
    indexTimeslices = true,
    indexRelations = true,
    computeGeometries = true,
    geometryConfig = defaultGeometryConfig(),
    progress = { update ->
        println("Phase=${update.phase}, done=${update.done}/${update.total}")
    }
)

// Query geometries for a specific feature UUID
val geometryApi = DatasetGeometryLookup(dataset.timesliceGeometries)
val geometries = geometryApi.findGeometries("8C4199C9-2D93-4C5D-A673-368292013551")

2. JS: Load Geometries in the Browser

@JsExport
suspend fun loadAndIndexAixm(xml: String): IndexedDataset {
    return indexWithReader(
        fileSize = xml.length.toLong(),
        readRange = { start, end ->
            xml.substring(start.toInt(), end.toInt()).encodeToByteArray()
        },
        computeDescriptors = false,
        descriptorConfig = emptyMap(),
        strategy = DescriptorStrategy.Topological,
        featureFilter = null,
        indexTimeslices = true,
        indexRelations = false,
        computeGeometries = true,
        geometryConfig = defaultGeometryConfig(),
        progress = null
    )
}

3. Use the Relations Index

for (rel in dataset.relations) {
    println("${rel.sourceFeatureType} ${rel.sourceFeatureUuid} " +
            "--${rel.relation}--> ${rel.targetFeatureUuid}")
}
Credits

Developed by: Annea s.r.o.

Lead Developers: Michal Kadlec

Contributors: Branislav Klčo

Developed with AI assistance.

Copyright

Annea s.r.o.

Contact

info@annea.sk