Skip to content

[Bug]: "Predicted N buildings in viewport" reports a near-zero, non-deterministic count at the widest zoom levels #127

Description

@airshiner

Summary

After a successful Predict all buildings run (112,689 buildings), the "Predicted N buildings in viewport" counter is non-monotonic: zooming out past roughly z11.2 makes the reported count collapse by ~200x, even though the map is rendering more footprints at that zoom than at any other.

Steps to reproduce

  1. Run Predict all buildings on a large layer (~110k buildings).
  2. Zoom out progressively and read the viewport counter at each level, allowing time to settle.

Measurement

Same map centre, 20 s settle at each step to rule out tile latency:

Zoom "Predicted N in viewport" Footprints rendered
11.13 413 109,668
11.54 78,469 90,404
11.80 74,988 90,404
12.13 59,116 93,045
13.13 14,768 26,222
14.13 2,903 6,308
15.13 933 3,072
16.13 322 926
17.13 103 826

From z12 up the trend is sensible. At z11.13 it inverts. The value is also unstable — repeated visits to the same z11.13 camera returned 791, then 413.

Impact

Minor, but the natural first move after a prediction run is to zoom out to see the whole affected area. Doing so reports a few hundred predictions instead of ~110k, which reads as "the prediction run mostly failed". The prediction overlay itself is drawn correctly at that zoom, so the readout directly contradicts what the user is looking at.

Suggested fix

Compute the counter from the prediction store filtered by the camera bounds, rather than from rendered/decimated tile features. Alternatively, suppress the number below the zoom at which it is reliable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions