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:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user