clone

an offline map explorer where each world, from a game map to a city's open data, ships as one .atlas file

feat/atlas-next-horizon
atlas / analysis / testdata / cells / identity.json
identity.json 16.4K
1{2 "family": "identity",3 "about": "Cell ids are opaque strings and \"\" is the root. This family pins what a system says about one id on its own: its depth, its parent, its ordinal among siblings, the two cuts of its label, and its palette index. Geohash ids refine by appending a character; S2 ids do not, which is the whole reason the contract speaks in opaque strings.",4 "cases": [5 {6 "name": "geohash-level-root",7 "ground": "test/square-1024",8 "system": "geohash",9 "call": "level",10 "args": [11 ""12 ],13 "expect": 0,14 "handDerived": true15 },16 {17 "name": "geohash-parent-root",18 "ground": "test/square-1024",19 "system": "geohash",20 "call": "parent",21 "args": [22 ""23 ],24 "expect": "",25 "handDerived": true26 },27 {28 "name": "geohash-level-m",29 "ground": "test/square-1024",30 "system": "geohash",31 "call": "level",32 "args": [33 "m"34 ],35 "expect": 1,36 "handDerived": true37 },38 {39 "name": "geohash-parent-m",40 "ground": "test/square-1024",41 "system": "geohash",42 "call": "parent",43 "args": [44 "m"45 ],46 "expect": "",47 "handDerived": true48 },49 {50 "name": "geohash-level-m6",51 "ground": "test/square-1024",52 "system": "geohash",53 "call": "level",54 "args": [55 "m6"56 ],57 "expect": 2,58 "handDerived": true59 },60 {61 "name": "geohash-parent-m6",62 "ground": "test/square-1024",63 "system": "geohash",64 "call": "parent",65 "args": [66 "m6"67 ],68 "expect": "m",69 "handDerived": true70 },71 {72 "name": "geohash-level-m6s",73 "ground": "test/square-1024",74 "system": "geohash",75 "call": "level",76 "args": [77 "m6s"78 ],79 "expect": 3,80 "handDerived": true81 },82 {83 "name": "geohash-parent-m6s",84 "ground": "test/square-1024",85 "system": "geohash",86 "call": "parent",87 "args": [88 "m6s"89 ],90 "expect": "m6",91 "handDerived": true92 },93 {94 "name": "geohash-child-index",95 "ground": "test/square-1024",96 "system": "geohash",97 "call": "childIndex",98 "args": [99 "m6"100 ],101 "expect": 6,102 "handDerived": true103 },104 {105 "name": "geohash-label",106 "ground": "test/square-1024",107 "system": "geohash",108 "call": "label",109 "args": [110 "m6s"111 ],112 "expect": {113 "context": "m6",114 "principal": "s"115 },116 "handDerived": true117 },118 {119 "name": "geohash-color-key-0",120 "ground": "test/square-1024",121 "system": "geohash",122 "call": "colorKey",123 "args": [124 "0"125 ],126 "expect": 0127 },128 {129 "name": "geohash-color-key-m",130 "ground": "test/square-1024",131 "system": "geohash",132 "call": "colorKey",133 "args": [134 "m"135 ],136 "expect": 9137 },138 {139 "name": "geohash-color-key-m6",140 "ground": "test/square-1024",141 "system": "geohash",142 "call": "colorKey",143 "args": [144 "m6"145 ],146 "expect": 6147 },148 {149 "name": "geohash-color-key-m6s",150 "ground": "test/square-1024",151 "system": "geohash",152 "call": "colorKey",153 "args": [154 "m6s"155 ],156 "expect": 4157 },158 {159 "name": "geohash-color-key-mz",160 "ground": "test/square-1024",161 "system": "geohash",162 "call": "colorKey",163 "args": [164 "mz"165 ],166 "expect": 1167 },168 {169 "name": "s2-level-of-a-face",170 "ground": "test/sphere-8192x4096",171 "system": "s2",172 "call": "level",173 "args": [174 "1"175 ],176 "expect": 1,177 "handDerived": true178 },179 {180 "name": "s2-level-47a1cb",181 "ground": "test/sphere-8192x4096",182 "system": "s2",183 "call": "level",184 "args": [185 "47a1cb"186 ],187 "expect": 11,188 "note": "port level = S2 level + 1.",189 "handDerived": true190 },191 {192 "name": "s2-parent-of-a-face-is-the-root",193 "ground": "test/sphere-8192x4096",194 "system": "s2",195 "call": "parent",196 "args": [197 "1"198 ],199 "expect": "",200 "handDerived": true201 },202 {203 "name": "s2-parent-5",204 "ground": "test/sphere-8192x4096",205 "system": "s2",206 "call": "parent",207 "args": [208 "5"209 ],210 "expect": ""211 },212 {213 "name": "s2-level-5",214 "ground": "test/sphere-8192x4096",215 "system": "s2",216 "call": "level",217 "args": [218 "5"219 ],220 "expect": 1221 },222 {223 "name": "s2-child-index-5",224 "ground": "test/sphere-8192x4096",225 "system": "s2",226 "call": "childIndex",227 "args": [228 "5"229 ],230 "expect": 2231 },232 {233 "name": "s2-label-5",234 "ground": "test/sphere-8192x4096",235 "system": "s2",236 "call": "label",237 "args": [238 "5"239 ],240 "expect": {241 "context": "",242 "principal": "5"243 }244 },245 {246 "name": "s2-color-key-5",247 "ground": "test/sphere-8192x4096",248 "system": "s2",249 "call": "colorKey",250 "args": [251 "5"252 ],253 "expect": 2,254 "note": "Sibling tokens can share their final character, so the accent comes from the sibling ordinal instead."255 },256 {257 "name": "s2-parent-44",258 "ground": "test/sphere-8192x4096",259 "system": "s2",260 "call": "parent",261 "args": [262 "44"263 ],264 "expect": "5"265 },266 {267 "name": "s2-level-44",268 "ground": "test/sphere-8192x4096",269 "system": "s2",270 "call": "level",271 "args": [272 "44"273 ],274 "expect": 2275 },276 {277 "name": "s2-child-index-44",278 "ground": "test/sphere-8192x4096",279 "system": "s2",280 "call": "childIndex",281 "args": [282 "44"283 ],284 "expect": 0285 },286 {287 "name": "s2-label-44",288 "ground": "test/sphere-8192x4096",289 "system": "s2",290 "call": "label",291 "args": [292 "44"293 ],294 "expect": {295 "context": "4",296 "principal": "4"297 }298 },299 {300 "name": "s2-color-key-44",301 "ground": "test/sphere-8192x4096",302 "system": "s2",303 "call": "colorKey",304 "args": [305 "44"306 ],307 "expect": 0308 },309 {310 "name": "s2-parent-47",311 "ground": "test/sphere-8192x4096",312 "system": "s2",313 "call": "parent",314 "args": [315 "47"316 ],317 "expect": "44"318 },319 {320 "name": "s2-level-47",321 "ground": "test/sphere-8192x4096",322 "system": "s2",323 "call": "level",324 "args": [325 "47"326 ],327 "expect": 3328 },329 {330 "name": "s2-child-index-47",331 "ground": "test/sphere-8192x4096",332 "system": "s2",333 "call": "childIndex",334 "args": [335 "47"336 ],337 "expect": 3338 },339 {340 "name": "s2-label-47",341 "ground": "test/sphere-8192x4096",342 "system": "s2",343 "call": "label",344 "args": [345 "47"346 ],347 "expect": {348 "context": "4",349 "principal": "7"350 }351 },352 {353 "name": "s2-color-key-47",354 "ground": "test/sphere-8192x4096",355 "system": "s2",356 "call": "colorKey",357 "args": [358 "47"359 ],360 "expect": 3361 },362 {363 "name": "s2-parent-47c",364 "ground": "test/sphere-8192x4096",365 "system": "s2",366 "call": "parent",367 "args": [368 "47c"369 ],370 "expect": "47"371 },372 {373 "name": "s2-level-47c",374 "ground": "test/sphere-8192x4096",375 "system": "s2",376 "call": "level",377 "args": [378 "47c"379 ],380 "expect": 4381 },382 {383 "name": "s2-child-index-47c",384 "ground": "test/sphere-8192x4096",385 "system": "s2",386 "call": "childIndex",387 "args": [388 "47c"389 ],390 "expect": 3391 },392 {393 "name": "s2-label-47c",394 "ground": "test/sphere-8192x4096",395 "system": "s2",396 "call": "label",397 "args": [398 "47c"399 ],400 "expect": {401 "context": "47",402 "principal": "c"403 }404 },405 {406 "name": "s2-color-key-47c",407 "ground": "test/sphere-8192x4096",408 "system": "s2",409 "call": "colorKey",410 "args": [411 "47c"412 ],413 "expect": 3414 },415 {416 "name": "s2-parent-47b",417 "ground": "test/sphere-8192x4096",418 "system": "s2",419 "call": "parent",420 "args": [421 "47b"422 ],423 "expect": "47c"424 },425 {426 "name": "s2-level-47b",427 "ground": "test/sphere-8192x4096",428 "system": "s2",429 "call": "level",430 "args": [431 "47b"432 ],433 "expect": 5434 },435 {436 "name": "s2-child-index-47b",437 "ground": "test/sphere-8192x4096",438 "system": "s2",439 "call": "childIndex",440 "args": [441 "47b"442 ],443 "expect": 1444 },445 {446 "name": "s2-label-47b",447 "ground": "test/sphere-8192x4096",448 "system": "s2",449 "call": "label",450 "args": [451 "47b"452 ],453 "expect": {454 "context": "47",455 "principal": "b"456 }457 },458 {459 "name": "s2-color-key-47b",460 "ground": "test/sphere-8192x4096",461 "system": "s2",462 "call": "colorKey",463 "args": [464 "47b"465 ],466 "expect": 1467 },468 {469 "name": "s2-parent-47a4",470 "ground": "test/sphere-8192x4096",471 "system": "s2",472 "call": "parent",473 "args": [474 "47a4"475 ],476 "expect": "47b"477 },478 {479 "name": "s2-level-47a4",480 "ground": "test/sphere-8192x4096",481 "system": "s2",482 "call": "level",483 "args": [484 "47a4"485 ],486 "expect": 6487 },488 {489 "name": "s2-child-index-47a4",490 "ground": "test/sphere-8192x4096",491 "system": "s2",492 "call": "childIndex",493 "args": [494 "47a4"495 ],496 "expect": 0497 },498 {499 "name": "s2-label-47a4",500 "ground": "test/sphere-8192x4096",501 "system": "s2",502 "call": "label",503 "args": [504 "47a4"505 ],506 "expect": {507 "context": "47a",508 "principal": "4"509 }510 },511 {512 "name": "s2-color-key-47a4",513 "ground": "test/sphere-8192x4096",514 "system": "s2",515 "call": "colorKey",516 "args": [517 "47a4"518 ],519 "expect": 0520 },521 {522 "name": "s2-parent-47a1",523 "ground": "test/sphere-8192x4096",524 "system": "s2",525 "call": "parent",526 "args": [527 "47a1"528 ],529 "expect": "47a4"530 },531 {532 "name": "s2-level-47a1",533 "ground": "test/sphere-8192x4096",534 "system": "s2",535 "call": "level",536 "args": [537 "47a1"538 ],539 "expect": 7540 },541 {542 "name": "s2-child-index-47a1",543 "ground": "test/sphere-8192x4096",544 "system": "s2",545 "call": "childIndex",546 "args": [547 "47a1"548 ],549 "expect": 0550 },551 {552 "name": "s2-label-47a1",553 "ground": "test/sphere-8192x4096",554 "system": "s2",555 "call": "label",556 "args": [557 "47a1"558 ],559 "expect": {560 "context": "47a",561 "principal": "1"562 }563 },564 {565 "name": "s2-color-key-47a1",566 "ground": "test/sphere-8192x4096",567 "system": "s2",568 "call": "colorKey",569 "args": [570 "47a1"571 ],572 "expect": 0573 },574 {575 "name": "s2-parent-47a1c",576 "ground": "test/sphere-8192x4096",577 "system": "s2",578 "call": "parent",579 "args": [580 "47a1c"581 ],582 "expect": "47a1"583 },584 {585 "name": "s2-level-47a1c",586 "ground": "test/sphere-8192x4096",587 "system": "s2",588 "call": "level",589 "args": [590 "47a1c"591 ],592 "expect": 8593 },594 {595 "name": "s2-child-index-47a1c",596 "ground": "test/sphere-8192x4096",597 "system": "s2",598 "call": "childIndex",599 "args": [600 "47a1c"601 ],602 "expect": 3603 },604 {605 "name": "s2-label-47a1c",606 "ground": "test/sphere-8192x4096",607 "system": "s2",608 "call": "label",609 "args": [610 "47a1c"611 ],612 "expect": {613 "context": "47a1",614 "principal": "c"615 }616 },617 {618 "name": "s2-color-key-47a1c",619 "ground": "test/sphere-8192x4096",620 "system": "s2",621 "call": "colorKey",622 "args": [623 "47a1c"624 ],625 "expect": 3626 },627 {628 "name": "s2-parent-47a1d",629 "ground": "test/sphere-8192x4096",630 "system": "s2",631 "call": "parent",632 "args": [633 "47a1d"634 ],635 "expect": "47a1c"636 },637 {638 "name": "s2-level-47a1d",639 "ground": "test/sphere-8192x4096",640 "system": "s2",641 "call": "level",642 "args": [643 "47a1d"644 ],645 "expect": 9646 },647 {648 "name": "s2-child-index-47a1d",649 "ground": "test/sphere-8192x4096",650 "system": "s2",651 "call": "childIndex",652 "args": [653 "47a1d"654 ],655 "expect": 2656 },657 {658 "name": "s2-label-47a1d",659 "ground": "test/sphere-8192x4096",660 "system": "s2",661 "call": "label",662 "args": [663 "47a1d"664 ],665 "expect": {666 "context": "47a1",667 "principal": "d"668 }669 },670 {671 "name": "s2-color-key-47a1d",672 "ground": "test/sphere-8192x4096",673 "system": "s2",674 "call": "colorKey",675 "args": [676 "47a1d"677 ],678 "expect": 2679 },680 {681 "name": "s2-parent-47a1cc",682 "ground": "test/sphere-8192x4096",683 "system": "s2",684 "call": "parent",685 "args": [686 "47a1cc"687 ],688 "expect": "47a1d"689 },690 {691 "name": "s2-level-47a1cc",692 "ground": "test/sphere-8192x4096",693 "system": "s2",694 "call": "level",695 "args": [696 "47a1cc"697 ],698 "expect": 10699 },700 {701 "name": "s2-child-index-47a1cc",702 "ground": "test/sphere-8192x4096",703 "system": "s2",704 "call": "childIndex",705 "args": [706 "47a1cc"707 ],708 "expect": 1709 },710 {711 "name": "s2-label-47a1cc",712 "ground": "test/sphere-8192x4096",713 "system": "s2",714 "call": "label",715 "args": [716 "47a1cc"717 ],718 "expect": {719 "context": "47a1c",720 "principal": "c"721 }722 },723 {724 "name": "s2-color-key-47a1cc",725 "ground": "test/sphere-8192x4096",726 "system": "s2",727 "call": "colorKey",728 "args": [729 "47a1cc"730 ],731 "expect": 1732 },733 {734 "name": "s2-parent-47a1cb",735 "ground": "test/sphere-8192x4096",736 "system": "s2",737 "call": "parent",738 "args": [739 "47a1cb"740 ],741 "expect": "47a1cc"742 },743 {744 "name": "s2-level-47a1cb",745 "ground": "test/sphere-8192x4096",746 "system": "s2",747 "call": "level",748 "args": [749 "47a1cb"750 ],751 "expect": 11752 },753 {754 "name": "s2-child-index-47a1cb",755 "ground": "test/sphere-8192x4096",756 "system": "s2",757 "call": "childIndex",758 "args": [759 "47a1cb"760 ],761 "expect": 1762 },763 {764 "name": "s2-label-47a1cb",765 "ground": "test/sphere-8192x4096",766 "system": "s2",767 "call": "label",768 "args": [769 "47a1cb"770 ],771 "expect": {772 "context": "47a1c",773 "principal": "b"774 }775 },776 {777 "name": "s2-color-key-47a1cb",778 "ground": "test/sphere-8192x4096",779 "system": "s2",780 "call": "colorKey",781 "args": [782 "47a1cb"783 ],784 "expect": 1785 },786 {787 "name": "real-level-root",788 "ground": "bend-or/2026-08-02/0",789 "system": "geohash",790 "call": "level",791 "args": [792 ""793 ],794 "expect": 0,795 "handDerived": true796 },797 {798 "name": "real-level-base-cell",799 "ground": "bend-or/2026-08-02/0",800 "system": "geohash",801 "call": "level",802 "args": [803 "9rcd"804 ],805 "expect": 1,806 "note": "Level counts LAYERS on real ground: the root's children are four characters long and level 1, so the telescope is still three deep.",807 "handDerived": true808 },809 {810 "name": "real-level-floor",811 "ground": "bend-or/2026-08-02/0",812 "system": "geohash",813 "call": "level",814 "args": [815 "9rcdxk"816 ],817 "expect": 3,818 "handDerived": true819 },820 {821 "name": "real-label",822 "ground": "bend-or/2026-08-02/0",823 "system": "geohash",824 "call": "label",825 "args": [826 "9rcdxk"827 ],828 "expect": {829 "context": "9rcdx",830 "principal": "k"831 },832 "handDerived": true833 }834 ]835}