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 / carry.json
carry.json 2.2K
1{2 "family": "carry",3 "about": "equivalentCell: a place carried across systems. The two hierarchies share no boundaries, so what survives is the point and the precision — the cell of the new system holding the old cell's centre, at the depth whose area is closest on a log scale.",4 "cases": [5 {6 "name": "root-carries-to-root",7 "ground": "test/sphere-8192x4096",8 "call": "equivalentCell",9 "args": [10 "geohash",11 "s2",12 ""13 ],14 "expect": "",15 "handDerived": true16 },17 {18 "name": "geohash-m6-to-s2",19 "ground": "test/sphere-8192x4096",20 "call": "equivalentCell",21 "args": [22 "geohash",23 "s2",24 "m6"25 ],26 "expect": "213",27 "note": "A level-2 geohash cell is 256x128 of the 8192x4096 world; the S2 cell holding its centre at the nearest area sits within a level either way."28 },29 {30 "name": "carried-cell-holds-the-old-centre",31 "ground": "test/sphere-8192x4096",32 "system": "s2",33 "call": "contains",34 "args": [35 "213",36 [37 5504,38 -275239 ]40 ],41 "expect": true,42 "handDerived": true43 },44 {45 "name": "and-back-to-geohash",46 "ground": "test/sphere-8192x4096",47 "call": "equivalentCell",48 "args": [49 "s2",50 "geohash",51 "213"52 ],53 "expect": "m6"54 },55 {56 "name": "round-trip-holds-the-s2-centre",57 "ground": "test/sphere-8192x4096",58 "system": "geohash",59 "call": "contains",60 "args": [61 "m6",62 [63 5560.028045868422,64 -2708.732937647088465 ]66 ],67 "expect": true,68 "handDerived": true69 },70 {71 "name": "geohash-m-to-s2",72 "ground": "test/sphere-8192x4096",73 "call": "equivalentCell",74 "args": [75 "geohash",76 "s2",77 "m"78 ],79 "expect": "24"80 },81 {82 "name": "s2-face-to-geohash",83 "ground": "test/sphere-8192x4096",84 "call": "equivalentCell",85 "args": [86 "s2",87 "geohash",88 "5"89 ],90 "expect": "b",91 "note": "A polar face carried onto a plane's halving: the face's centre is the north pole itself."92 }93 ]94}