Creates a stateless airspace resolver. The resolver accepts a GeoJSON
FeatureCollection at initialization (typically from @squawk/airspace-data)
and returns an object with methods for querying by position and altitude
or by associated airport / SUA identifier.
Position queries perform two checks per feature:
Lateral - point-in-polygon test against the feature boundary
Vertical - altitude comparison against floor/ceiling bounds
AGL-referenced altitude bounds are handled conservatively: when the
resolver cannot determine the MSL equivalent (because it has no terrain
data), it includes the feature rather than silently excluding it. This
means the resolver may return features whose AGL bounds do not actually
contain the queried altitude. Consumers can inspect the returned
AltitudeBound references and apply their own terrain lookup if needed.
Creates a stateless airspace resolver. The resolver accepts a GeoJSON FeatureCollection at initialization (typically from
@squawk/airspace-data) and returns an object with methods for querying by position and altitude or by associated airport / SUA identifier.Position queries perform two checks per feature:
AGL-referenced altitude bounds are handled conservatively: when the resolver cannot determine the MSL equivalent (because it has no terrain data), it includes the feature rather than silently excluding it. This means the resolver may return features whose AGL bounds do not actually contain the queried altitude. Consumers can inspect the returned AltitudeBound references and apply their own terrain lookup if needed.