Skip to content

Prototype viewport PM2.5 KDE grid behind coverage and performance guards #308

@Jesssullivan

Description

@Jesssullivan

Linear: https://linear.app/tinyland/issue/TIN-1730/prototype-viewport-pm25-kde-grid-behind-coverage-and-performance

Problem

The current smog overlay is a MapLibre heatmap over station points. A true viewport KDE/grid could make PM2.5 support more legible, but it can also be CPU-heavy, misleading over sparse data, and expensive if implemented as tile infrastructure too early.

Scope

  • Prototype a viewport-scoped PM2.5 KDE/grid behind a feature flag or development-only switch.
  • Reuse the same PM2.5 field-sample semantics and null-exclusion rules as the point estimator.
  • Cache by normalized bbox/zoom band and debounce recompute on map movement.
  • Measure CPU/render impact on mobile-sized viewport before making it default.
  • Do not add server-side tile infrastructure unless browser performance and API-amplification data justify it.

Acceptance

  • Prototype produces a visibly useful density field only when numeric station coverage is sufficient.
  • Sparse coverage renders a clear insufficient-support state instead of a fabricated smooth blanket.
  • Benchmarks document mobile recompute/render cost.
  • Product decision recorded: keep MapLibre heatmap, ship client KDE, or plan server-side tiles.

Related: #275, #249, #270.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlinear-syncMirrors active Linear planning ticketsmapsMap data, layers, routes, and geospatial UXmobileMobile and field-device UXstabilityReliability and long-term operational hardening

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions