Module osm.topology.closure

Bounded cycle-safe OSM topology closure traversal.

Child closure walks Relation membership depth-first in source order and also expands resolved Way members to their ordered Node references. Duplicate edges are emitted. Relations are expanded at most once to break cycles.

Parent closure emits distinct parent elements in deterministic first- discovery order and uses existing reverse indexes.

Functions

NameDescription
walkParentClosure(dataset, index, rootType, rootId, workspace, limits, visitor, status) Walk distinct parents using an explicit OwnedDatasetIndex reverse index.
walkParentClosure(store, rootType, rootId, workspace, limits, visitor, status) Walk distinct live Store parents of one typed OSM identity.
walkRelationClosure(store, root, workspace, limits, visitor, status) Walk the full descendant closure of one live Store Relation.
walkRelationClosure(dataset, index, rootRelationId, workspace, limits, visitor, status) Walk the full descendant closure of one indexed OwnedDataset Relation.

Structs

NameDescription
OwnedChildVisit One descendant edge discovered through an OwnedDataset Relation closure.
OwnedParentVisit One distinct parent discovered through an OwnedDataset explicit index.
StoreChildVisit One descendant edge discovered through an OsmStore Relation closure.
StoreParentVisit One distinct parent discovered through OsmStore reverse indexes.
TopologyTraversalLimits Explicit work bounds for hostile or unexpectedly deep OSM graphs.
TopologyTraversalStatus Result and progress of one closure traversal.
TopologyTraversalWorkspace Reusable visited sets and queues for closure traversal.

Enums

NameDescription
TopologyTraversalError Why a bounded topology traversal stopped with an error.