1// The grounds the tests stand on.2//3// Written here rather than read from `analysis/testdata/cells/grounds.json`4// on purpose: the shared vectors judge this lane (vectors.test.ts) and must5// stay something the property tests cannot quietly become. These are the6// clean design's own fixtures, and they say what a Ground is by being one.78import type { Ground } from "../cellsystems/ground.ts";910/** A 1024 world declaring the whole of itself as its lens surface. */11export const square: Ground = {12 tileGridSize: 1024,13 lens: { surface: { x: 0, y: 0, width: 1024, height: 1024 }, bounds: null },14 world: { attrs: {} },15};1617/** The same world with a lens that declares only a raster window. */18export const squareFromBounds: Ground = {19 tileGridSize: 1024,20 lens: { surface: null, bounds: { x: 128, y: 256, width: 512, height: 256 } },21 world: { attrs: {} },22};2324/** The same world with no lens open at all: the last fallback. */25export const squareNoLens: Ground = {26 tileGridSize: 1024,27 lens: null,28 world: { attrs: {} },29};3031/** No volume, no lens: an empty ground, which surfaceExtent still answers for. */32export const nothing: Ground = {33 tileGridSize: null,34 lens: null,35 world: { attrs: {} },36};3738/** The top half of an 8192 square declared as a whole equirectangular sphere. */39export const sphere: Ground = {40 tileGridSize: 8192,41 lens: { surface: { x: 0, y: 0, width: 8192, height: 4096 }, bounds: null },42 world: {43 attrs: {44 "atlas.geometry.surface": "sphere",45 "atlas.geometry.projection": "equirect",46 "atlas.geometry.equirect.px": "0,0,8192,4096",47 "atlas.geometry.equirect.deg": "-180,90,180,-90",48 },49 },50};5152/** A Web-Mercator city window on a sphere: the other flattening, exercised. */53export const mercatorCity: Ground = {54 tileGridSize: 8192,55 lens: { surface: { x: 0, y: 0, width: 4096, height: 4096 }, bounds: null },56 world: {57 attrs: {58 "atlas.geometry.surface": "sphere",59 "atlas.geometry.projection": "mercator",60 "atlas.geometry.mercator.px": "0,0,4096,4096",61 "atlas.geometry.mercator.deg": "-121.4,44.15,-121.2,43.99",62 },63 },64};6566/** A sphere that declares no flattening: S2 must refuse it. */67export const sphereWithoutMapping: Ground = {68 tileGridSize: 8192,69 lens: { surface: { x: 0, y: 0, width: 8192, height: 4096 }, bounds: null },70 world: { attrs: { "atlas.geometry.surface": "sphere" } },71};7273/**74 * An earth-anchored plane: a city map that declares an earth Mercator window,75 * so its geohash is REAL — genuine WGS84 addresses of the pictured ground.76 * Invented numbers, none of them the corpus's: a 4096 square over a77 * 0.8° × 0.5° window, whose base depth is 4 because the depth-4 spans78 * (0.3515625° × 0.17578125°) both fit and the depth-3 spans (1.40625° both79 * ways) fit neither. The window's north edge, 45°, lies exactly on a depth-480 * cell boundary (768 · 0.17578125° above −90°), so the edge-touching row is81 * deliberately exercised: a cell that only touches pictures nothing and is82 * not enumerated. Districted, so the carry has a second system to cross to.83 */84export const anchored: Ground = {85 tileGridSize: 4096,86 lens: { surface: { x: 0, y: 0, width: 4096, height: 4096 }, bounds: null },87 world: {88 attrs: {89 "atlas.geometry.surface": "plane",90 "atlas.geometry.body": "earth",91 "atlas.geometry.mercator.px": "0,0,4096,4096",92 "atlas.geometry.mercator.deg": "-122,45,-121.2,44.5",93 "atlas.district.grid": "3x3",94 },95 },96};9798/**99 * The corpus city's own declaration, transcribed from100 * `testdata/corpus/bundles/bend-or/worlds/2026-08-02.payload.json` — the101 * ground the shared bend-or vectors are read on, spelled here so the intent102 * tests can hold the derived depths (base 4, floor 6) to the real window.103 */104export const bendOr: Ground = {105 tileGridSize: 8192,106 lens: { surface: { x: 0, y: 0, width: 8192, height: 8192 }, bounds: null },107 world: {108 attrs: {109 "atlas.geometry.surface": "plane",110 "atlas.geometry.body": "earth",111 "atlas.geometry.mercator.px": "0,0,8192,8192",112 "atlas.geometry.mercator.deg":113 "-121.48204667177453,44.17572950664809,-121.1529533282255,43.93922950850393",114 },115 },116};