code wiki / _hdl_build / nx_geo_tiles_gate.nx
nx_geo_tiles_gate.nx
buildroot/runtime/_hdl_build/nx_geo_tiles_gate.nx
about
nx_geo_tiles_gate.nx -- GATE for GEO-019 geodetic z/x/y tiles. Proves:
point->tile : NYC (40.7128,-74.006) at z=4 -> tile (tx=4, ty=4)
tile->bbox : bbox(z4,4,4) == [minlat 33750000, minlon -90000000, maxlat 45000000, maxlon -67500000]
round-trip : that bbox CONTAINS NYC (exact, no seam gap)
zoom0 : any point -> tile (0,0)
clamp : far corner (lat -90e6, lon 180e6) at z4 -> tile (15,15)
Evidence -> knowledge/status/geo_tiles.log (GEOTILESGATE authored=organ ... verdict=GREEN).
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_geo_tiles.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 13 | const GT_LOG: *u8 = "knowledge/status/geo_tiles.log" |
functions
| 15 | func gt_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 16 | func gt_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 } |
| 18 | func gt_emit(fd: i64, tx: i64, ty: i64, contains: i64, minlat: i64, maxlon: i64, z0x: i64, z0y: i64, clx: i64, cly: i64, ok: i64) -> i64 |
| 30 | func main() -> i64 |