feat: complete file-based heightmap migration — tEXt sea_level, client relief, drop BLOB (#963)

- heightmap.rs: read sea_level from the PNG tEXt chunk (bake writes it),
  default-fallback param; new test reads_sea_level_from_text_chunk.
- client atlas_viewer.gd: load reliefmap.png (color display) instead of
  heightmap.png (now 16-bit grayscale elevation, cascade-only).
- drop atlas_body_heightmaps: removed from systems-schema.sql; DROP TABLE in
  import_economics MIGRATION_SQL (the PNG is the store now).
- D-202 amendment: implementation-status note (consumer + producer done),
  resolving the review's 'reads done but producer pending' point.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-23 08:23:23 +02:00
co-authored by Claude Opus 4.7
parent 3b2cd6914e
commit b71f339996
5 changed files with 50 additions and 29 deletions
+4 -10
View File
@@ -297,16 +297,10 @@ DELETE FROM meta WHERE generator_name = 'generate_brands';
-- (T6) would reject any committed DB that still carries the old row.
DELETE FROM meta WHERE generator_name = 'generate_atlas';
-- Heightmap BLOB storage (D-202, #901)
CREATE TABLE IF NOT EXISTS atlas_body_heightmaps (
body_id TEXT PRIMARY KEY REFERENCES bodies(body_id) ON DELETE CASCADE,
width INTEGER NOT NULL DEFAULT 512,
height INTEGER NOT NULL DEFAULT 256,
data BLOB NOT NULL,
sea_level REAL NOT NULL DEFAULT 0.0,
imported_at TEXT NOT NULL DEFAULT (datetime('now'))
);
CREATE INDEX IF NOT EXISTS idx_atlas_body_heightmaps_body ON atlas_body_heightmaps(body_id);
-- Drop the retired heightmap BLOB table (D-202 amended, #963): canonical
-- elevation is now a per-body 16-bit grayscale heightmap.png file, not a DB
-- BLOB. The Rust loader reads the PNG; nothing reads this table anymore.
DROP TABLE IF EXISTS atlas_body_heightmaps;
-- City name reservations (D-207, #902)
CREATE TABLE IF NOT EXISTS atlas_city_names (