Commit graph

11 commits

Author SHA1 Message Date
Admin
2492ad3bde map: rain radar overlay, flying 3D markers, Europe routing, geodata crate
- rain radar layer: pure-Rust KNMI HDF5 reader (superblock v0 walk,
  single-chunk deflate datasets, byte-exact vs h5py), ellipsoidal polar
  stereographic reprojection (20 m vs product corners), bilinear value
  sampling -> smooth banded isolines, textured quad overlay through the
  overlay camera, 25-frame nowcast animation; RadarSync polls at most
  once per 4 min through a disk-persisted gate and caches frames on disk
- makepad-geodata + makepad-tesla crates join the workspace (overlay
  builders, radar sync, NL open-data layers; transit routes now z7-14)
- Europe major-roads routing graph: nav-build --major-roads does a
  ways-first scan (5.7M ways / 46M nodes / 194 s / 971 MB) and the app
  falls back to it when a route leaves the regional graph — Amsterdam to
  Paris routes offline (501.8 km)
- 3D flying markers: chargers/POIs/stops ride thin stalks with DYNAMIC
  height (each pin clears its own building +8 m); labels, kW text,
  brand and tap zones all consume the baked per-marker lift; stalks and
  buildings grow together on the 2D->3D transition (per-tile flat->3D
  fade heights, no replay on zoom regens)
- markers depth-honest (small bias, buildings occlude them); phong-lit
  canopy/light spheres matching the buildings' NW sun; buildings tint by
  BAG age in 3D; district area tints (rank 60, alpha .32); transit line
  labels + stop names; follow-mode is an explicit attach/detach toggle;
  rotation release schedules the label re-place (no stuck upside-down
  labels after a fast spin)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 18:00:27 +02:00
Admin
68bc80709a map: charger pin redesign, upright/billboard labels, 3D trees, exits
- Tesla-style droplet pins anchored at the tail tip (rotate around the
  exact site point in tilted views); red exclusively Tesla, amber DC,
  blue AC; Tesla pins show stall count, others peak kW
- in-pin text through the normal text renderer: billboard-anchored
  glyphs (anchor scales with the map, glyph size constant), exempt from
  label collision/repeat culling, no halo
- upright camera-delta labels: straightened labels (place names, POIs,
  brands, pin text) translate with the rotation gesture but stay
  horizontal — no more rotate-then-snap on regen
- per-icon zoom floors baked in vertex param4 + live icon_zoom uniform:
  stale deeper-bucket tiles never flash markers on zoom-out (param4 is
  lift-height only for non-icon shapes — icons stay on the ground)
- motorway exit labels (street_labels_points): carto-red name + ref
- 2D/3D mode: tilt gesture syncs app state (TiltChanged action), tilt
  release near-flat settles to exact 0, mode flip re-bakes tiles
  (extrusions appear/disappear without a zoom nudge)
- Simple 3D Buildings: building:part volumes with min_height bases;
  outlines containing parts flatten to footprints; famous buildings
  with tourism=attraction extrude instead of dying as attraction fills
- little 3D trees in tilt mode: crossed trunk quads + sphere-slice
  ball canopy (architecture-model proportions)
- searchdb/mbtiles support work: reach-based distance ranking, direct
  tile lookup + writer ordering

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 16:02:44 +02:00
Admin
49615ae325 map_tiles: parallel relation assembly — pass 4 joins the flat-store club
Relations reference ways randomly across the extract; the 128-group
WayStore LRU crawled Europe's pass 4 at ~260 relations/s (5+ hours).
Now: FlatWayStore decodes the whole relation-member way store into RAM
next to FlatNodeStore, assembler workers resolve and prepare features
(new prepare_point completes the set), a single writer owns the spool,
and the ordered consumer only parses members/tags. NH pass 4 3.9s ->
1.3s, per-layer feature counts identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:13:13 +02:00
Admin
2fd2731421 map_tiles: node coords i32 in RAM — flat store halves to ~40GB, lossless
Projected grid values are <= 2^26 at zoom 14, so i32 is exact; decode
hard-errors on out-of-range rather than ever truncating (no swimming
roads). NH output identical feature counts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 11:59:34 +02:00
Admin
1f7359e73e map_tiles: flat in-RAM node store — pass 3 goes lock-free
Europe's ways arrive in creation order, i.e. spatially random: any node
cache that fits in a fraction of the store loses. The store is only
13.8GB compressed, so FlatNodeStore decodes ALL of it once (parallel,
~a minute for Europe) and resolver workers share it lock-free via Arc —
no cache, no eviction, no zlib on the hot path. NH pass 3: 5.6s -> 3.5s;
feature counts unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 11:55:25 +02:00
Admin
283545f928 map_tiles: parallel way resolution — pass 3 another 6x faster
- NodeStore eviction was a min_by_key scan of the whole cache per miss;
  with the Europe-sized cache that scan became the bottleneck (1.2k
  ways/s). FIFO queue eviction is O(1) amortized
- way resolution now fans out over a resolver worker pool (each with
  its own NodeStore handle and cache slice); geometry is localized on
  the workers via prepare_lines/prepare_polygons and a single writer
  thread owns the spool, so the on-disk format is untouched. The
  id-ordered relation-way store stays on the ordered consumer thread
- Noord-Holland: pass 3 32.6s -> 5.6s, full conversion 25.7s; per-layer
  feature counts identical (byte diff is record interleave order only)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 10:57:29 +02:00
Admin
a776bf69d0 map_tiles: 12x+ faster pbf-detail conversion
Two fixes to the detail converter that spent 10+ hours on Europe:
- visit_pbf: ordered parallel decode — blob reads stay serial, the
  zlib+protobuf decode fans out over a worker pool, and the callback
  runs in exact file order on the calling thread, so id-ordered store
  builders need no changes
- NodeStore group cache: 256 groups (128MB) thrashed on Europe-scale
  way resolution (~115us/way of cache-miss zlib re-decode, ~8.6k
  ways/s); now MAKEPAD_NODE_CACHE_MIB (default 8GB), way resolution
  ~370k/s

Noord-Holland: 61s end-to-end, output byte-identical to the slow
converter (7547 tiles, same bytes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 10:38:51 +02:00
Admin
61691f155e map: implicit ring closure for osm_lines areas, icon collision priority
- Hella Haasseplein root cause: pedestrian squares in osm_lines arrive
  as LineStrings, so `closed` was never set and the area admission
  skipped them — detect implicit closure (first==last) and mark the
  ring closed for the fill pass
- icon collision: doors and generic dots now yield to real symbols
  (the recycling icon was losing to the building entrance beside it);
  entrances gate at z18 like carto
- tools: tagprobe <pbf> <name> — dump every OSM element matching a
  name, for answering "how is this actually tagged" without overpass

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 23:44:12 +02:00
Admin
4dff00e610 map: Europe searchdb, route elevation profile, rail/tram/water-label styling
- libs/map_nav searchdb: disk-backed all-of-Europe search index (120M docs,
  8GB, ~30ms cold queries via pread; external-sort builder, cell-sharded
  postings, rank heads, digit-token address filtering with street fallback);
  nav-build --searchdb two-pass pbf streaming; nav-probe dbsearch; app
  worker prefers local/maps/europe.searchdb over the places index
- examples/map elevation: dem.rs fetches AWS skadi SRTM tiles on demand
  (cached local/maps/dem/, offline after), median+220m smoothing and 2.5m
  climb hysteresis so radar rooftop noise doesn't fake ascent in flat
  cities; elev_graph.rs DrawVector profile panel above the route bar
- rail styling: heavy rail draws carto sleeper look (theme casing + white
  stripe dash) z14+; trams/metro stay a solid near-black line (shortbread
  tags trams rail=true — kind decides now); platform/station/dead railway
  values no longer draw as track linework
- water name labels: water_polygons_labels/water_lines_labels admitted
  through extraction, source ranks, and LABEL_CLASS_WATER colors; label
  layers excluded from stroke styling (double-drew as rivers)
- label fix: near-vertical reading-direction tie-break was inverted;
  vertical street names read bottom-to-top under any camera rotation
- cleanness: oneway arrows lighter+sparser, tree discs smaller

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 23:13:47 +02:00
Admin
a82446e72d map: continent-wide place search with Google-style tiered ranking
score_search_hit: settlements are near-immune to distance ("brussels"
from Amsterdam means Bruxelles, not the closest Brusselsestraat),
POIs/streets keep strong local bias, and a number token signals
address intent. nav-build --places-only scans a pbf for settlement
nodes into a compact index (Europe: 1.31M places, 67MB, 60s); the app
merges it with the regional full index, deduping same-name near hits.

Route overlay decimation now measures against the last drawn point,
bounding the error at ~1.5px — pairwise skipping compounded and
visibly reshaped the route when zoomed out.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 22:16:44 +02:00
Admin
fc63b33a84 map: Europe tile conversion pipeline + offline GPS navigator
Conversion tooling (tools/map_tiles): curated Shortbread base pyramid
from a VersaTiles planet archive (bbox extract, brotli->gzip transcode
parallelized per 256x256 block), all-tag native OSM pbf detail
converter, pbf audit, and nav-build/nav-probe producing the routing
graph + search index artifacts. download_map.sh orchestrates pinned
downloads and conversions. mbtile_reader writer now skips SQLite's
lock-byte page at byte offset 1 GiB — allocating through it corrupted
every database over 1 GiB ("2nd reference to page 16385"); the 31 GB
Europe conversion passes integrity checks.

Navigation (libs/map_nav, new): region.search place/POI/street/address
index (prefix autocomplete, NL/EN category synonyms, proximity
ranking) and region.graph routing graph (CSR directed edges,
car/bike/foot speeds, oneway, turn restrictions, snap grid, A*),
maneuver generation and the NavSession map-matching state machine;
26 unit tests.

MapView interaction layer: MapViewAction, camera API + animated
fly_to, overlay.rs (route polyline with traveled dimming, markers,
position puck), per-widget mbtiles_path override, archive
minzoom/maxzoom honored for tile requests, zoom-level cross-fade over
the previous level's imagery, floating panels win hit-testing.
examples/map is the navigator app: worker-thread search, Drive/Bike/
Walk routing, simulated turn-by-turn with banner, follow camera.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 20:13:21 +02:00