FIMViz.jsAPI
    Preparing search index...

    Class PredicateFilter

    Hierarchy (View Summary)

    Index
    fn: (...args: any[]) => boolean
    • 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