From 8ee3d4cde5c64382ebcd38bfd3283a906645da46 Mon Sep 17 00:00:00 2001 From: Mikkeli Date: Fri, 4 Sep 2026 10:56:03 +0900 Subject: [PATCH] Correct admin build: must use full Japan extract, not a sub-region Verified on the Orin. A Shikoku extract yields only admin_level=4 prefecture rows with no country record, and drive_on_right=1 on every one, so tiles built against it route as right-hand traffic. The full Japan extract yields the JP country row with drive_on_right=0. The failure is silent, so every build now verifies the country row before tiles are considered usable. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_013kj58Jugkic783b8ZrtTVZ --- docs/GUIDELINES.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/GUIDELINES.md b/docs/GUIDELINES.md index 5e6666e..5fcd934 100644 --- a/docs/GUIDELINES.md +++ b/docs/GUIDELINES.md @@ -9,10 +9,19 @@ type: default - Every build records the source PBF's date. An artifact whose provenance is unknown is an artifact to rebuild. -## 2. Build the admin database first +## 2. Build the admin database first, and from the *full* extract - `valhalla_build_admins` is what determines driving side, and it is a separate step *before* the tile build. -- Skip it and Valhalla routes and narrates as though Japan drove on the right. +- **Always build it from `japan-latest.osm.pbf`, never a sub-region.** Driving side + is a country-level property. A Shikoku extract yields only `admin_level=4` + prefecture rows, no country record, and `drive_on_right=1` on every one — + measured, not theorised. +- The admin build and the tile build are separate invocations against the same + config, so routing tiles may still come from a small regional extract while the + admin database comes from the whole country. +- **Verify, do not assume.** Every build checks that a country-level row exists and + reports `drive_on_right=0` before the tiles are considered usable. This failure + is silent otherwise: routing simply comes out mirrored. ## 3. Tiles ship as a directory, not a tar - Once for RAM on an 8 GB board, once because `rsync` deltas a tree of changed