code wiki / _hdl_build / nx_geo_census.nx
nx_geo_census.nx
buildroot/runtime/_hdl_build/nx_geo_census.nx
about
nx_geo_census.nx -- GATE + CENSUS for GEO-004: the MEASURED-exceed scoreboard (no-wave). Twin of
nx_competitive_census, for geo. Seeds an incumbent feature refset (Google-Maps/PostGIS/Turf/S2/H3
killer features) into the SOVEREIGN STORE (knowledge/store/geo-*, NOT tsv), then for each feature
marks PRESENT *only* if a real Nishi gate log is GREEN -- never asserted. Computes reach permil.
Honest by design: today we are BEHIND (a handful present of ~28); the number RATCHETS UP as each
GEO rung lands. This is how "superior to google" is proven, not claimed.
The GATE proves the COUNTING LOGIC (a known-GREEN log -> present; "-" or missing/non-green -> not
present), so the reach figure is trustworthy. Evidence -> knowledge/status/geo_census.log.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_seg_store.nxnx_itoa_lib.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
| 14 | const GC_MAGIC_262144: i64 = 262144 |
| 16 | const GC_PREFIX: *u8 = "knowledge/store/geo-" |
| 17 | const GC_KEY: *u8 = "geocensus:refset" |
| 18 | const GC_LOG: *u8 = "knowledge/status/geo_census.log" |
| 22 | const GC_REFSET: *u8 = "geofence-polygon turf/shapely/postgis knowledge/status/geo_gate.log\ngeofence-radius turf/postgis knowledge/status/geo_gate.log\nbbox-prefilter rtree/postgis knowledge/status/geo_gate.log\ngeohash-index geohash/redis-geo knowledge/status/geohash_gate.log\nproximity-prefix geohash knowledge/status/geohash_gate.log\ndistance-meters turf/postgis/google knowledge/status/geo_distance.log\nhaversine-precise turf/postgis knowledge/status/geo_haversine.log\nbearing-heading turf knowledge/status/geo_query.log\nnearest-knn postgis/turf knowledge/status/geo_query.log\ngeocoding google/nominatim knowledge/status/geo_geocode.log\nreverse-geocoding google/nominatim knowledge/status/geo_geocode.log\nrouting-shortest-path google/osrm/valhalla knowledge/status/geo_route.log\nisochrones google/valhalla knowledge/status/geo_route.log\nvector-tiles mapbox/google knowledge/status/geo_tiles.log\nraster-render mapbox/leaflet knowledge/status/geo_raster.log\ns2-cells google-s2 knowledge/status/geo_s2.log\nh3-hex uber-h3 knowledge/status/geo_h3.log\npolygon-area turf/postgis knowledge/status/geo_area.log\npolygon-centroid turf/postgis knowledge/status/geo_centroid.log\nconvex-hull turf/postgis knowledge/status/geo_hull.log\nline-simplify turf/mapbox knowledge/status/geo_simplify.log\npolygon-intersection turf/postgis knowledge/status/geo_clip.log\npolygon-union turf/postgis knowledge/status/geo_union.log\nbuffer-offset turf/postgis knowledge/status/geo_buffer.log\nspatial-join postgis knowledge/status/geo_join.log\nline-of-sight cesium knowledge/status/geo_los.log\nplaces-search google/osm knowledge/status/geo_places.log\nmap-matching osrm/google knowledge/status/geo_match.log\n" |
functions
| 24 | func gc_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 } |
| 29 | func gc_wn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 30 | func gc_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 32 | func gc_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 43 | func gc_has(buf: *u8, n: i64, needle: *u8) -> i64 |
| 58 | func gc_gate_green(path: *u8, plen: i64) -> i64 |
| 71 | func gc_streq_store(val: *u8, vlen: i64) -> i64 |
| 84 | func gc_measure(buf: *u8, n: i64, outtot: *i64) -> i64 |
| 112 | func gc_emit(fd: i64, present: i64, total: i64, reach: i64, ok: i64) -> i64 |
| 121 | func main() -> i64 |