code wiki / _hdl_build / nx_geo_mapsvg.nx

nx_geo_mapsvg.nx

buildroot/runtime/_hdl_build/nx_geo_mapsvg.nx

7693 B115 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic geo
docsdependenciesstructsconstsfunctions

about

nx_geo_mapsvg.nx -- GEO-007: the SOVEREIGN MAP SURFACE. Renders real geo data (gazetteer cities, a geofence, a route) to an HTML page with INLINE SVG -- a vector map drawn bits-up from Nishi data with ZERO third-party map library (no Leaflet / Mapbox / Google / OpenLayers; SVG is the last-mile web standard, like HTML/HTTP). Equirectangular projection (integer microdegrees -> viewport px). Writes sites/nishifamily/maps/index.html so nx_sites_daemon serves it at nishifamily.com/maps. This is the "privacy + sovereign map" surface: the geometry, projection and styling are all ours.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_geo_mapsvg.nx

imports: nx_syscalls.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap sys_openat_wr m_w sys_write sys_exit m_n nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap m_py m_px sys_close

structs

none

consts

9const K_MAGIC_180000000: i64 = 180000000
10const K_MAGIC_360000000: i64 = 360000000
11const K_MAGIC_90000000: i64 = 90000000
12const K_MAGIC_51505000: i64 = 51505000
13const K_MAGIC_127000: i64 = 127000
14const K_MAGIC_35676000: i64 = 35676000
15const K_MAGIC_139650000: i64 = 139650000
16const K_MAGIC_40712000: i64 = 40712000
17const K_MAGIC_74006000: i64 = 74006000
18const K_MAGIC_33868000: i64 = 33868000
19const K_MAGIC_151209000: i64 = 151209000
20const K_MAGIC_48856000: i64 = 48856000
21const K_MAGIC_2352000: i64 = 2352000
22const K_MAGIC_30044000: i64 = 30044000
23const K_MAGIC_31235000: i64 = 31235000
24const K_MAGIC_22906000: i64 = 22906000
25const K_MAGIC_43172000: i64 = 43172000
26const K_MAGIC_55755000: i64 = 55755000
27const K_MAGIC_37617000: i64 = 37617000
28const K_MAGIC_30000000: i64 = 30000000

functions

30func m_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 }
called by 1: main calls 1: sys_write
35func m_n(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 }
called by 1: main calls 1: nxi_fd
37func m_px(lon_md: i64) -> i64 { return (lon_md + K_MAGIC_180000000) * 960 / K_MAGIC_360000000 }
called by 1: main
38func m_py(lat_md: i64) -> i64 { return (K_MAGIC_90000000 - lat_md) * 480 / K_MAGIC_180000000 }
called by 1: main
39func main(argc: i64, argv: *i64) -> i64