FIMViz.jsAPI
    Preparing search index...

    Class SpatialFilter

    Hierarchy (View Summary)

    Index
    features: { lat: number; lng: number }[][]
    • Inside ANY ring (multi-polygon union).

      Parameters

      • lat: number
      • lng: number

      Returns boolean

    • Fast-reject window in pixel space (union across rings), mirroring ui/rasterTools.js polygonPixelBbox.

      Parameters

      • meta: {
            be: number;
            bn: number;
            bs: number;
            bw: number;
            height: number;
            width: number;
        }

      Returns { x0: number; x1: number; y0: number; y1: number }

    • Coerce any friendly input into a Filter. Filter-like → returned as-is (anything with a test(unit) method) function → PredicateFilter Region-like → input.toFilter() polygon → SpatialFilter ([[lat,lng],…] | [{lat,lng},…] | [[ring],[ring]…])

      DUCK-TYPED, not instanceof Filter, for the same reason nothing in the engine does instanceof Dataset: class identity is per-module-instance, and fimviz and fimviz/ui are two separate bundles that each carry their own copy of this file. A SpatialFilter built by fimviz/ui's createRegionDraw is therefore NOT instanceof the engine bundle's Filter, so layer.getStats({ filter }) rejected the tool's own output. Testing for the method — the only thing every call site actually uses — makes the seam work across bundles and lets a host pass its own filter object.

      Parameters

      • input: Function | any[] | Filter | { toFilter: () => Filter }

      Returns Filter