Commit Graph

9 Commits

Author SHA1 Message Date
6b984f2882 world_grid_atlas: harden geometry, alignment, linear_fit, DDS/MHIU bounds, manifests, and strict JSON (WORLD-GRID-ATLAS-VALIDATION-HARDENING) 2026-11-25 03:35:15 +01:00
c33f9d6e8d world_grid_atlas: diagnose one-cell shoreline grids
Mask matching ranks the best and runner-up overlaps, so a single cell has no second score. Reject grids with fewer than two cells using the same error as content matching.
2026-11-24 00:41:03 -05:00
4e70e9c106 Accelerate world atlas mask matching with optional Rust
Co-Authored-By: GPT 6.2 Sol <noreply@openai.com>
2026-11-23 20:54:13 +01:00
1d21030853 world_grid_atlas: read exported texture manifest.json with utf-8-sig (#6599)
Squash-merged after diff review of PR #6599
2026-11-23 11:19:01 -06:00
d510dce18e docs: point world_grid_atlas at its --help usage line (#6671)
Squash-merged after diff review of PR #6671 - docs: point world_grid_atlas at its --help usage line
2026-11-23 10:05:32 -06:00
7dbaa0409a Repo rules after round 44: stdout guards on 13 programs, newline= on four text writes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:25:51 -05:00
de90d1eff4 world_grid_atlas: publish --json through a unique temp file
A fixed <json>.tmp blocked every later run while a stale file or folder
kept that name (review on #4353). write_json() now stages through
tempfile.mkstemp in the output folder, gives it the replaced file's mode
(file_mode.published_mode), and removes it on failure, as the other
publishing tools do. Three standard-library tests cover a stale .tmp
folder, a failed replace and the kept file mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:20:59 -05:00
390bfc0088 world_grid_atlas: address pre-PR review
- --json is refused anywhere under <work>/assets or the carve (links
  resolved), not only over a manifest.
- Order fill keeps the longest run of anchors consistent with archive
  order instead of dropping greedily after one wrong anchor.
- Duplicate tile records, tiles in other archives and dictionaries that
  hold only part of a shared group are counted and printed.
- Shoreline reports anchors moved by the alignment and unplaced tiles
  with features; the summary prints tile and fallback sizes and formats.
- A carve without heightmaps says so instead of reporting 0 of 0.
- Non-square or too small tiles, one-cell grids and fractional grid sizes
  are rejected with one stderr line; the JSON write is atomic.
- docs: quoted numbers now name their field; -300 m is at the PAMH floor,
  not below it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:49:52 -05:00
c3b541264a world_grid_atlas: place the water grid tiles and check zInflation
The four GridAtlasInfo grids are water data: water height (R16), shoreline
(BGRA) and two water fog textures (BC6H). Their tiles are named only by the
grid's suffix. The tool places them by matching each tile with the grid's
fallback mosaic and checks archive order: the tile dictionaries are stored
in text order of the decimal cell index.

zInflation is checked against the world's height data: all heightmap Z
ranges and the water heights lie inside origin z +- 1,000. The water-height
scale (about 41 units per metre) and the north-up row order come from a fit
against the MHIU terrain.

Tests: stdlib logic tests plus a synthetic forward check (numpy/Pillow).
docs/gamedata.md "Grid atlases" is updated from the tool's output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:39:17 -05:00