@squawk
    Preparing search index...

    Function createAirspaceResolver

    • 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:

      1. Lateral - point-in-polygon test against the feature boundary
      2. 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.

      import { usBundledAirspace } from '@squawk/airspace-data';
      import { createAirspaceResolver } from '@squawk/airspace';

      const resolver = createAirspaceResolver({ data: usBundledAirspace });
      const overhead = resolver.query({ lat: 33.9425, lon: -118.4081, altitudeFt: 3000 });
      const laxShells = resolver.byAirport('LAX');

      Parameters

      Returns AirspaceResolver