# Journey C: Farm-Gate Off-Road Field Routing — GlobalGrid2050 Explore Code (text shard) Attribution: Ventus Ltd — GlobalGrid2050. Cut 2026-12-06T03:07:51+00:00. Generated deterministically from the public Ventusltd repositories by tools/explore/build.py (rules explore-agent-rules-v1); every statement is evidence-keyed and links to the exact commit and lines. Fields per file: Source (GitHub commit URL with line range), Page (Explore Code section), Synopsis, What it achieves (provenance), the four-part block, Signatures, VEDIC, domain_stage, commercial_user, canonical_status, data_contracts, Edges. Rules: https://code.globalgrid2050.com/explore-code/llms.txt (Agent Navigation Protocol) and GRAPH-CONTRACT.md. Journey page: https://code.globalgrid2050.com/explore-code/journeys/c.html. Steps (named in Ventus Ltd's brief): 1. Data UK DNO/TSO: data_uk_dno_and_tso (found by repository name: data_uk_dno_and_tso) 2. SatNav: satnav (found by repository name: satnav) 3. Compass: compass (found by repository name: compass) 4. LiDAR: lidar (found by repository name: lidar) Links between steps: - No direct code link found between Data UK DNO/TSO and SatNav. - No direct code link found between SatNav and Compass. - No direct code link found between Compass and LiDAR. ## Step 1: Data UK DNO/TSO ### Audit Workflow - File: data_uk_dno_and_tso/.github/workflows/audit.yml (YAML, 32 lines) · role automation · stage unknown · entry point - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/.github/workflows/audit.yml#L1-L32 - Page: https://code.globalgrid2050.com/explore-code/s/1706.html#f3 - Synopsis: A GitHub Actions workflow in Data UK DNO And TSO. Runs on push, on pull requests and by hand. - What it achieves (comment): Named “Audit declared data”; runs Validate Declared (`scripts/validate_declared.py`), Validate Schema Drift (`scripts/validate_schema_drift.py`) and Build Declared (`scripts/build_declared.py`). - What it does: It runs automated jobs on GitHub Actions. Side effects: starts processes. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Downstream impact: It is itself an entry point (workflow); no other file was found loading it. - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 3 estate files (workflow-run 3); used by 0; mentioned by 0 ### Fetch CKAN Catalogue - File: data_uk_dno_and_tso/scripts/fetch_ckan_catalogue.py (Python, 71 lines) · role storage · stage output · entry point - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/fetch_ckan_catalogue.py#L1-L71 - Page: https://code.globalgrid2050.com/explore-code/s/0318.html#f4 - Synopsis: A Python command-line tool in the scripts folder of Data UK DNO And TSO that reads sources, using SHA-256. - What it achieves (name): Its name says it fetches CKAN catalogue. Defines `load_sources` and `portal_base_from_action_url`. - What it does: It loads sources. Defines load_sources, portal_base_from_action_url, main. Uses libraries __future__, argparse, json, pathlib, urllib.parse. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Inputs & outputs: In: JSON file sources.json; JSON file catalogue.json; command-line arguments. - Downstream impact: It is itself an entry point (Python CLI); no other file was found loading it. - Signatures: `load_sources()`; `portal_base_from_action_url(url: str)`; `main()` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in [JSON file sources.json; JSON file catalogue.json; command-line arguments]; out []; crs []; voltages [] - Edges: uses 3 estate files (import 3); used by 0; mentioned by 0 ### Fetch Ods Catalogue - File: data_uk_dno_and_tso/scripts/fetch_ods_catalogue.py (Python, 69 lines) · role storage · stage output · entry point - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/fetch_ods_catalogue.py#L1-L69 - Page: https://code.globalgrid2050.com/explore-code/s/0318.html#f6 - Synopsis: A Python command-line tool in the scripts folder of Data UK DNO And TSO that reads sources, using SHA-256. - What it achieves (name): Its name says it fetches ods catalogue. Defines `load_sources` and `portal_base_from_catalogue_url`. It accepts `--limit`. - What it does: It loads sources. Defines load_sources, portal_base_from_catalogue_url, main. Uses libraries __future__, argparse, json, pathlib, urllib.parse. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Inputs & outputs: In: JSON file sources.json; JSON file catalogue.json; command-line arguments. - Downstream impact: It is itself an entry point (Python CLI); no other file was found loading it. - Signatures: `load_sources()`; `portal_base_from_catalogue_url(url: str)`; `main()` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in [JSON file sources.json; JSON file catalogue.json; command-line arguments]; out []; crs []; voltages [] - Edges: uses 3 estate files (import 3); used by 0; mentioned by 0 ### Build Declared - File: data_uk_dno_and_tso/scripts/build_declared.py (Python, 38 lines) · role storage · stage output · entry point - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/build_declared.py#L1-L38 - Page: https://code.globalgrid2050.com/explore-code/s/0318.html#f3 - Synopsis: A Python command-line tool in the scripts folder of Data UK DNO And TSO that reads CSV (`read_csv`). - What it achieves (name): Its name says it builds declared. Defines `read_csv` and `write_json`. - What it does: It loads data. Defines read_csv, write_json, main. Uses libraries __future__, csv, json, pathlib. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Downstream impact: Used directly by 1 file: Audit Workflow (data_uk_dno_and_tso). - Signatures: `read_csv(path: Path)`; `write_json(name: str, rows: list[dict[str, str]])`; `main()` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 2 estate files (import 2); used by 1; mentioned by 0 ### Data UK Distribution Network Operator (DNO) and Transmission System Operator (TSO) — Index Page - File: data_uk_dno_and_tso/index.html (HTML, 320 lines) · role render · stage output · entry point - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/index.html#L1-L320 - Page: https://code.globalgrid2050.com/explore-code/s/0318.html#f2 - Synopsis: A web page in Data UK DNO And TSO that draws MPAN distributor, sources, operators schema and transmission ownership. - What it achieves (comment): Canonical public-data spine for UK and Ireland electricity network operators, DNO licence areas, transmission owners, National Energy System Operator (NESO), regulators and government public energy datasets. - What it does: It draws mpan distributor, sources, operators schema and transmission ownership. Side effects: changes the web page (DOM). - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Inputs & outputs: In: CSV file mpan_distributor.csv; JSON file sources.json; CSV file operators.csv; CSV file transmission_ownership.csv; CSV file department_lineage.csv; JSON file operators.schema.json; DuckDB queries. Out: web page. - Downstream impact: It is itself an entry point (page); no other file was found loading it. - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in [CSV file mpan_distributor.csv; JSON file sources.json; CSV file operators.csv; CSV file transmission_ownership.csv; CSV file department_lineage.csv; JSON file operators.schema.json; DuckDB queries]; out [web page]; crs []; voltages [] - Edges: uses 0 estate files; used by 0; mentioned by 0 ### Fetch NESO Distribution Network Operator (DNO) Boundaries - File: data_uk_dno_and_tso/scripts/fetch_neso_dno_boundaries.py (Python, 14 lines) · role energy-data · stage transform · entry point - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/fetch_neso_dno_boundaries.py#L1-L14 - Page: https://code.globalgrid2050.com/explore-code/s/0318.html#f5 - Synopsis: A Python command-line tool in the scripts folder of Data UK DNO And TSO that uses EPSG:27700 and EPSG:4326. - What it achieves (name): Its name says it fetches NESO DNO boundaries. - What it does: It calculates its inputs. Defines main. Uses libraries __future__. - Why it exists in the grid workflow: Domain stage upstream_foresight (path word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Inputs & outputs: Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid), WGS84 / EPSG:4326. - Downstream impact: It is itself an entry point (Python CLI); no other file was found loading it. - Signatures: `main()` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in []; out []; crs [OSGB36 / EPSG:27700 (British National Grid); WGS84 / EPSG:4326]; voltages [] - Edges: uses 0 estate files; used by 0; mentioned by 0 ### Validate Declared - File: data_uk_dno_and_tso/scripts/validate_declared.py (Python, 39 lines) · role other · stage ingest · entry point - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/validate_declared.py#L1-L39 - Page: https://code.globalgrid2050.com/explore-code/s/0319.html#f4 - Synopsis: A Python command-line tool in the scripts folder of Data UK DNO And TSO that validates CSV (`validate_csv`). - What it achieves (name): Its name says it validates declared. Defines `validate_csv`. - What it does: Defines validate_csv, main. Uses libraries __future__, csv, pathlib. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Downstream impact: Used directly by 1 file: Audit Workflow (data_uk_dno_and_tso). - Signatures: `validate_csv(path: Path)`; `main()` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 1; mentioned by 0 ### Validate Schema Drift - File: data_uk_dno_and_tso/scripts/validate_schema_drift.py (Python, 41 lines) · role ingest · stage ingest · entry point - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/validate_schema_drift.py#L1-L41 - Page: https://code.globalgrid2050.com/explore-code/s/0319.html#f5 - Synopsis: A Python command-line tool in the scripts folder of Data UK DNO And TSO that works with required columns (`required_columns`) and header columns (`header_columns`). - What it achieves (name): Its name says it validates schema drift. Defines `required_columns` and `header_columns`. - What it does: It loads data. Defines required_columns, header_columns, main. Uses libraries __future__, argparse, csv, json, pathlib. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Inputs & outputs: In: command-line arguments. - Downstream impact: Used directly by 1 file: Audit Workflow (data_uk_dno_and_tso). - Signatures: `required_columns(schema_path: Path)`; `header_columns(csv_path: Path)`; `main()` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in [command-line arguments]; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 1; mentioned by 0 ### Audit - File: data_uk_dno_and_tso/scripts/lib/audit.py (Python, 26 lines) · role storage · stage output - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/lib/audit.py#L1-L26 - Page: https://code.globalgrid2050.com/explore-code/s/0318.html#f7 - Synopsis: A Python module in the scripts folder of Data UK DNO And TSO that writes receipts (`write_receipts`). - What it achieves (name): Defines `utc_now` and `write_receipts`. - What it does: Defines utc_now, write_receipts. Uses libraries __future__, json, datetime, pathlib, typing. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Downstream impact: Used directly by 3 files: Build Declared (data_uk_dno_and_tso); Fetch CKAN Catalogue (data_uk_dno_and_tso); Fetch Ods Catalogue (data_uk_dno_and_tso). Reached from 1 other entry point, including Audit Workflow (data_uk_dno_and_tso). - Signatures: `utc_now()`; `write_receipts(run_name: str, payload: dict[str, Any])` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 3; mentioned by 0 ### Hashing - File: data_uk_dno_and_tso/scripts/lib/hashing.py (Python, 13 lines) · role other · stage ingest - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/lib/hashing.py#L1-L13 - Page: https://code.globalgrid2050.com/explore-code/s/0319.html#f2 - Synopsis: A Python module in the scripts folder of Data UK DNO And TSO that works with sha256 file (`sha256_file`), using SHA-256. - What it achieves (name): Defines `sha256_file`. - What it does: Defines sha256_file. Uses libraries __future__, hashlib, pathlib. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Downstream impact: Used directly by 3 files: Build Declared (data_uk_dno_and_tso); Fetch CKAN Catalogue (data_uk_dno_and_tso); Fetch Ods Catalogue (data_uk_dno_and_tso). Reached from 1 other entry point, including Audit Workflow (data_uk_dno_and_tso). - Signatures: `sha256_file(path: str | Path)` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 3; mentioned by 0 ### CKAN - File: data_uk_dno_and_tso/scripts/lib/ckan.py (Python, 43 lines) · role ingest · stage ingest - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/lib/ckan.py#L1-L43 - Page: https://code.globalgrid2050.com/explore-code/s/0319.html#f1 - Synopsis: A Python module in the scripts folder of Data UK DNO And TSO that gets action (`get_action`). It is built from the CKAN portal class (`CKANPortal`). - What it achieves (name): Defines `CKANPortal`, `action_base`, `action_url` and 1 more. - What it does: It fetches data. Defines CKANPortal, action_base, _headers, action_url, get_action. Uses libraries __future__, json, os, time, urllib.parse. Side effects: makes network requests. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Downstream impact: Used directly by 1 file: Fetch CKAN Catalogue (data_uk_dno_and_tso). - Signatures: `class CKANPortal`; `action_base(self)`; `_headers(api_key_env: str | None)`; `action_url(portal: CKANPortal, action: str, **params: str)`; `get_action(portal: CKANPortal, action: str, **params: str)` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 1; mentioned by 0 ### Opendatasoft - File: data_uk_dno_and_tso/scripts/lib/opendatasoft.py (Python, 56 lines) · role ingest · stage ingest - Source: https://github.com/Ventusltd/data_uk_dno_and_tso/blob/0f012179c2271a7d3bbb06a91af915d23bd9396b/scripts/lib/opendatasoft.py#L1-L56 - Page: https://code.globalgrid2050.com/explore-code/s/0319.html#f3 - Synopsis: A Python module in the scripts folder of Data UK DNO And TSO that lists datasets (`list_datasets`) and exports URL (`export_url`). - What it achieves (name): It is built from the ods portal class (`ODSPortal`) and the records URL helper (`records_url`). Defines `ODSPortal`, `api_base`, `get_json` and 3 more. - What it does: It fetches data. Defines 7 functions or classes, including ODSPortal, api_base, _headers, get_json, list_datasets. Uses libraries __future__, json, os, urllib.parse, urllib.request. Side effects: makes network requests. - Why it exists in the grid workflow: Domain stage upstream_foresight (repository name word 'dno'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. - Downstream impact: Used directly by 1 file: Fetch Ods Catalogue (data_uk_dno_and_tso). - Signatures: `class ODSPortal`; `api_base(self)`; `_headers(api_key_env: str | None)`; `get_json(url: str, headers: dict[str, str])`; `list_datasets(portal: ODSPortal, limit: int = 100)`; `records_url(portal: ODSPortal, dataset_id: str, *, limit: int = 10, offset: int = 0)`; `export_url(portal: ODSPortal, dataset_id: str, fmt: str = "json")` - domain_stage: upstream_foresight · commercial_user: IPP_developer, ICP_grid_engineer · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 1; mentioned by 0 ## Step 2: SatNav ### SatNav — Scope Page - File: satnav/scope/index.html (HTML, 63 lines) · role render · stage output · entry point - Source: https://github.com/Ventusltd/satnav/blob/ea69138ca5d5a9632233220e5cbe1cd3f1c83432/scope/index.html#L1-L63 - Page: https://code.globalgrid2050.com/explore-code/s/0715.html#f9 - Published at: https://ventusltd.github.io/satnav/scope/ - Synopsis: A web page that draws pipeline headlines snapshot, solar, battery storage (BESS) and LiDAR terrain, and uses data from the GridAtlas, kuiper-belt and ventus-grid-engine repositories. Published at https://ventusltd.github.io/satnav/scope/. - What it achieves (comment): It sets reading (`setReading`) and is built from the safe link helper (`safeLink`) and the valid step (`valid`). UK electricity infrastructure navigation in development, with a GPS field compass test preview. It responds to click, focusin and pointerdown events. - What it does: It draws pipeline headlines snapshot, solar, battery storage (BESS) and LiDAR terrain. Defines safeLink, valid, render, setReading, load. Side effects: changes the web page (DOM); makes network requests. - Why it exists in the grid workflow: Domain stage field_execution (repository name word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. Domain terms in the code: solar, battery storage (BESS), LiDAR terrain. - Inputs & outputs: In: data source: gridatlas data; data source: kuiper-belt data; data source: ventus-grid-engine data; data source: globalgrid2050 data; JSON file pipeline_headlines.json; JSON file pipeline_headlines.snapshot.json. Out: web page. - Downstream impact: Used directly by 3 files: Build (cosmic); SatNav Public Scope Served Workflow (satnav); SatNav Public Scope Workflow (satnav). Reached from 4 other entry points, including Cadastre 27 (cosmic); Ship (cosmic); Test Build (cosmic). It is itself an entry point, published at https://ventusltd.github.io/satnav/scope/. - Signatures: `safeLink(value)`; `valid(doc)`; `render(doc,saved)`; `setReading(on)`; `load(url)` - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: production_core · essay_status: readme_derived - data_contracts: in [data source: gridatlas data; data source: kuiper-belt data; data source: ventus-grid-engine data; data source: globalgrid2050 data; JSON file pipeline_headlines.json; JSON file pipeline_headlines.snapshot.json]; out [web page]; crs []; voltages [] - Edges: uses 3 estate files (link 3); used by 3; mentioned by 0 ### SatNav Public Scope Served Workflow - File: satnav/.github/workflows/public-scope-served.yml (YAML, 84 lines) · role automation · stage ingest · entry point - Source: https://github.com/Ventusltd/satnav/blob/ea69138ca5d5a9632233220e5cbe1cd3f1c83432/.github/workflows/public-scope-served.yml#L1-L84 - Page: https://code.globalgrid2050.com/explore-code/s/1856.html#f7 - Synopsis: A GitHub Actions workflow using data from the GlobalGrid2050 and GlobalGrid2050-homepage repositories. Runs on push and by hand. - What it achieves (comment): Named “SatNav public served-byte verification”. - What it does: It runs automated jobs on GitHub Actions. Side effects: reads or writes files; makes network requests; starts processes. - Why it exists in the grid workflow: Domain stage field_execution (repository name word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Inputs & outputs: In: data source: globalgrid2050 data; data source: globalgrid2050-homepage data; JSON file homepage-owner.json; JSON file homepage.json. - Downstream impact: It is itself an entry point (workflow); no other file was found loading it. - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: production_core · essay_status: readme_derived - data_contracts: in [data source: globalgrid2050 data; data source: globalgrid2050-homepage data; JSON file homepage-owner.json; JSON file homepage.json]; out []; crs []; voltages [] - Edges: uses 1 estate file (estate-url 1); used by 0; mentioned by 0 ### SatNav Public Scope Workflow - File: satnav/.github/workflows/public-scope.yml (YAML, 188 lines) · role automation · stage output · entry point - Source: https://github.com/Ventusltd/satnav/blob/ea69138ca5d5a9632233220e5cbe1cd3f1c83432/.github/workflows/public-scope.yml#L1-L188 - Page: https://code.globalgrid2050.com/explore-code/s/1856.html#f8 - Synopsis: A GitHub Actions workflow that builds and publishes the site. Runs on push and on pull requests. - What it achieves (comment): Runs `/tmp/satnav-scope-cvaa/inoculate.mjs`. - What it does: It builds and publishes its content. Side effects: changes the web page (DOM); reads or writes files; makes network requests; starts processes. - Why it exists in the grid workflow: Domain stage field_execution (repository name word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Inputs & outputs: In: JSON file snapshot.json. Out: JSON file cvaa-comparison.json. - Downstream impact: It is itself an entry point (workflow); no other file was found loading it. - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: production_core · essay_status: readme_derived - data_contracts: in [JSON file snapshot.json]; out [JSON file cvaa-comparison.json]; crs []; voltages [] - Edges: uses 1 estate file (estate-url 1); used by 0; mentioned by 0 ### Compass - File: satnav/preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/compass.mjs (JavaScript, 18 lines) · role transform · stage transform · not reached (candidate for review) - Source: https://github.com/Ventusltd/satnav/blob/ea69138ca5d5a9632233220e5cbe1cd3f1c83432/preview/9698781539e549deaa6ecaa4a2b34610c1f9fd29/nav/compass.mjs#L1-L18 - Page: https://code.globalgrid2050.com/explore-code/s/0715.html#f8 - Synopsis: A JavaScript module in the nav folder of SatNav that works with fix quality (`fixQuality`). It is built from the fix quality helper (`fixQuality`) and the guide step (`guide`). - What it achieves (code): Its `fixQuality` function gives location fix quality from longitude latitude accuracy timestamp fix and optional reference time ms (VEDIC: check location fix). - What it does: It calculates its inputs. Defines fixQuality, guide. - Why it exists in the grid workflow: Domain stage field_execution (path word 'compass'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Downstream impact: Used directly by 1 file: Preview — Nav (satnav). - Signatures: `export fixQuality(fix,now=Date.now())`; `export guide(fix,target,now=Date.now())` - VEDIC: CHECK LOCATION FIX (GG2050-VEDIC-000062): SatNav · Location and navigation data. longitude_latitude_accuracy_timestamp_fix, reference_time_ms_optional -> location_fix_quality - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: unreached_review · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 1; mentioned by 0 ## Step 3: Compass ### Verify Workflow - File: compass/.github/workflows/verify.yml (YAML, 20 lines) · role automation · stage unknown · entry point - Source: https://github.com/Ventusltd/compass/blob/e200c888acbcc7af59d7cc38b29806e90b0a50db/.github/workflows/verify.yml#L1-L20 - Page: https://code.globalgrid2050.com/explore-code/s/1690.html#f6 - Synopsis: A GitHub Actions workflow in Compass. Runs on push, on pull requests and by hand. - What it achieves (comment): Named “Compass source isolation and replay”; runs Verify Source Pins (`scripts/verify-source-pins.mjs`). - What it does: It runs automated jobs on GitHub Actions. Side effects: starts processes. - Why it exists in the grid workflow: Domain stage field_execution (repository name word 'compass'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Downstream impact: It is itself an entry point (workflow); no other file was found loading it. - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 3 estate files (workflow-run 3); used by 0; mentioned by 0 ### Compass Test - File: compass/tests/compass.test.mjs (JavaScript, 53 lines) · role test · stage transform · entry point - Source: https://github.com/Ventusltd/compass/blob/e200c888acbcc7af59d7cc38b29806e90b0a50db/tests/compass.test.mjs#L1-L53 - Page: https://code.globalgrid2050.com/explore-code/s/1691.html#f1 - Synopsis: A test in the tests folder that checks Compass. - What it achieves (name): Defines `request`. - What it does: It tests its inputs. Defines request. Uses libraries node:test, node:assert/strict. - Why it exists in the grid workflow: Domain stage field_execution (path word 'compass'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Downstream impact: Used directly by 1 file: Verify Workflow (compass). - Signatures: `request(mode)` - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 1 estate file (import 1); used by 1; mentioned by 0 ### Heading Test - File: compass/upstream/tools/satnav/orientation/heading.test.mjs (JavaScript, 46 lines) · role test · stage transform · entry point - Source: https://github.com/Ventusltd/compass/blob/e200c888acbcc7af59d7cc38b29806e90b0a50db/upstream/tools/satnav/orientation/heading.test.mjs#L1-L46 - Page: https://code.globalgrid2050.com/explore-code/s/0467.html#f2 - Synopsis: A test in the orientation folder of Compass that checks Heading. - What it achieves (name): Defines `point` and `radius`. - What it does: It tests its inputs. Defines point, radius. Uses libraries node:assert/strict, node:test. - Why it exists in the grid workflow: Domain stage field_execution (path word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Downstream impact: Used directly by 1 file: Verify Workflow (compass). - Signatures: `point(role, coordinates)`; `radius(metres)` - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 1 estate file (import 1); used by 1; mentioned by 0 ### Verify Source Pins - File: compass/scripts/verify-source-pins.mjs (JavaScript, 10 lines) · role ingest · stage ingest · entry point - Source: https://github.com/Ventusltd/compass/blob/e200c888acbcc7af59d7cc38b29806e90b0a50db/scripts/verify-source-pins.mjs#L1-L10 - Page: https://code.globalgrid2050.com/explore-code/s/1690.html#f7 - Synopsis: A JavaScript module in the scripts folder of Compass. - What it achieves (name): Its name says it verifies source pins. It reads `upstream/source-pins.json`. - What it does: It loads data. Uses libraries node:fs, node:crypto. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage field_execution (repository name word 'compass'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Inputs & outputs: In: JSON file source-pins.json. - Downstream impact: Used directly by 1 file: Verify Workflow (compass). - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in [JSON file source-pins.json]; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 1; mentioned by 0 ### Route Follower - File: compass/upstream/tools/satnav/line/route-follower.mjs (JavaScript, 21 lines) · role transform · stage transform - Source: https://github.com/Ventusltd/compass/blob/e200c888acbcc7af59d7cc38b29806e90b0a50db/upstream/tools/satnav/line/route-follower.mjs#L1-L21 - Page: https://code.globalgrid2050.com/explore-code/s/0466.html#f7 - Synopsis: A JavaScript module in the line folder of Compass. It is built from the valid step (`valid`). - What it achieves (comment): Tracking only, not routing or authorisation. - What it does: It calculates its inputs. Defines createRouteFollower, valid. - Why it exists in the grid workflow: Domain stage field_execution (path word 'route'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Downstream impact: Used directly by 12 files: Position Overlay (compass); Ordered Convergence 2km (gridatlas); Ordered Convergence Unlimited (gridatlas); Ordered (gridatlas); and 8 more. Reached from 8 other entry points, including Verify Workflow (compass); GridAtlas PR File Size Guard Workflow (gridatlas); Compass Test (compass). - Signatures: `export createRouteFollower(geometry,maths)`; `valid(p)` - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 12; mentioned by 1 ### Heading - File: compass/upstream/tools/satnav/orientation/heading.mjs (JavaScript, 57 lines) · role transform · stage transform - Source: https://github.com/Ventusltd/compass/blob/e200c888acbcc7af59d7cc38b29806e90b0a50db/upstream/tools/satnav/orientation/heading.mjs#L1-L57 - Page: https://code.globalgrid2050.com/explore-code/s/0467.html#f1 - Synopsis: A JavaScript module in the orientation folder of Compass that formats degrees (`formatDegrees`) and calculates planar distances and angles. - What it achieves (name): It formats degrees (`formatDegrees`) and is built from the device heading helper (`deviceHeading`) and the compact target bearing helper (`compactTargetBearing`). Defines `normalise`, `formatDegrees`, `deviceHeading` and 1 more. - What it does: It calculates its inputs. Defines normalise, formatDegrees, deviceHeading, compactTargetBearing. - Why it exists in the grid workflow: Domain stage field_execution (path word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Downstream impact: Used directly by 4 files: Heading Test (compass); Orient17a V9211 Heading (gridatlas); Orient17a V9212 Heading (gridatlas); Compass (compass). Reached from 2 other entry points, including Verify Workflow (compass); Compass Test (compass). - Signatures: `export formatDegrees(degrees)`; `export deviceHeading(event, screenAngle = 0)`; `export compactTargetBearing(features)`; `normalise(degrees)`; `beta(Number.isFinite(event.beta) ? event.beta : 0)`; `gamma(Number.isFinite(event.gamma) ? event.gamma : 0)` - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 0 estate files; used by 4; mentioned by 0 ### Position Overlay - File: compass/upstream/tools/satnav/line/position-overlay.mjs (JavaScript, 32 lines) · role transform · stage transform - Source: https://github.com/Ventusltd/compass/blob/e200c888acbcc7af59d7cc38b29806e90b0a50db/upstream/tools/satnav/line/position-overlay.mjs#L1-L32 - Page: https://code.globalgrid2050.com/explore-code/s/0466.html#f6 - Synopsis: A JavaScript module in the line folder of Compass. - What it achieves (name): Defines `point` and `createPositionOverlay`. - What it does: It calculates its inputs. Defines point, createPositionOverlay. - Why it exists in the grid workflow: Domain stage field_execution (path word 'satnav'): on-road and off-road field navigation to the farm gate (access gates, terrain slope, ground-bearing limits, electrical hazards), as Ventus Ltd describes its SatNav work. - Downstream impact: Used directly by 1 file: Compass (compass). Reached from 2 other entry points, including Verify Workflow (compass); Compass Test (compass). - Signatures: `export point(role, coordinates)`; `export createPositionOverlay(coordinates, maths)` - domain_stage: field_execution · commercial_user: EPC_contractor, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 1 estate file (import 1); used by 1; mentioned by 1 ## Step 4: LiDAR ### LiDAR Build Site - File: lidar/src/build_site.py (Python, 84 lines) · role transform · stage transform · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/src/build_site.py#L1-L84 - Page: https://code.globalgrid2050.com/explore-code/s/0699.html#f1 - Synopsis: A Python command-line tool that works with LiDAR terrain. It is built from the snapped box helper (`snapped_box`) and the build step (`build`). - What it achieves (comment): Build a .ght tile set for one site from the EA LiDAR Composite DTM 1m. It accepts `--name`, `--e` and `--n`. - What it does: It calculates LiDAR terrain. Defines snapped_box, build, main. Uses libraries argparse, math, os, sys, time. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. Domain terms in the code: LiDAR terrain. - Inputs & outputs: In: command-line arguments. Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid). - Downstream impact: It is itself an entry point (Python CLI); no other file was found loading it. - Signatures: `snapped_box(e, n, size)`; `build(name, e, n, size, out_dir=None, cache_dir=None, log=print)`; `main(argv=None)` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in [command-line arguments]; out []; crs [OSGB36 / EPSG:27700 (British National Grid)]; voltages [] - Edges: uses 3 estate files (import 3); used by 0; mentioned by 0 ### Test Earthworks - File: lidar/tests/test_earthworks.py (Python, 111 lines) · role test · stage output · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/tests/test_earthworks.py#L1-L111 - Page: https://code.globalgrid2050.com/explore-code/s/0701.html#f2 - Synopsis: A test in the tests folder of LiDAR that checks LiDAR Earthworks Pair. It is built from the plane step (`plane`), the close step (`close`) and the one step (`one`). - What it achieves (comment): Tests for `src/earthworks_pair.py` on synthetic planes with known volumes. It writes `source.json`. - What it does: It tests its inputs. Defines 9 functions or classes, including plane, close, one, test_flat_straight, test_sloped_along_and_across. Uses libraries inspect, json, math, os, pathlib. Side effects: reads or writes files; starts processes. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. - Inputs & outputs: Out: JSON file source.json. - Downstream impact: It is itself an entry point (test); no other file was found loading it. - Signatures: `plane(xp, a=100.0, gx=0.0, gy=0.0, n=301)`; `close(v, want, rel=2e-3)`; `one(G, *a)`; `test_flat_straight()`; `test_sloped_along_and_across()`; `test_bent_flat_and_pappus()`; `test_platform_on_plane()`; `test_sweep_receipt(tmp_path)`; `test_bounded_by_seconds(tmp_path)` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out [JSON file source.json]; crs []; voltages [] - Edges: uses 1 estate file (sys-path 1); used by 0; mentioned by 0 ### Test Roundtrip - File: lidar/tests/test_roundtrip.py (Python, 104 lines) · role test · stage ingest · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/tests/test_roundtrip.py#L1-L104 - Page: https://code.globalgrid2050.com/explore-code/s/0701.html#f4 - Synopsis: A test in the tests folder of LiDAR that checks LiDAR Cut Tiles and LiDAR Geotiff Read, using EPSG:27700. It is built from the synthetic step (`synthetic`). - What it achieves (comment): Synthetic grid -> .ght tiles -> decode -> heights within 5 mm. - What it does: It tests its inputs. Defines synthetic, test_header_layout, test_row_order_south_to_north, test_roundtrip_within_5mm, test_shared_edges_match. Uses libraries json, os, struct, sys, tempfile. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. - Inputs & outputs: In: JSON file tiles.json. Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid). - Downstream impact: It is itself an entry point (test); no other file was found loading it. - Signatures: `synthetic(size=512, seed=7)`; `test_header_layout()`; `test_row_order_south_to_north()`; `test_roundtrip_within_5mm()`; `test_shared_edges_match()` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in [JSON file tiles.json]; out []; crs [OSGB36 / EPSG:27700 (British National Grid)]; voltages [] - Edges: uses 2 estate files (sys-path 2); used by 0; mentioned by 0 ### LiDAR Earthworks Pair - File: lidar/src/earthworks_pair.py (Python, 350 lines) · role storage · stage output · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/src/earthworks_pair.py#L1-L350 - Page: https://code.globalgrid2050.com/explore-code/s/0699.html#f3 - Synopsis: A Python command-line tool that reads earthworks receipt, using SHA-256. It is built from the ground class (`Ground`), the ground from helper (`ground_from`) and the routes step (`routes`). - What it achieves (comment): How much spoil does a trench (or a platform) make, counted two ways? It accepts `--tiles`, `--seed` and `--trenches`. - What it does: It loads earthworks receipt. Defines 16 functions or classes, including Ground, __init__, h, ground_from, routes. Uses libraries argparse, hashlib, json, math, os. Side effects: reads or writes files; starts processes. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. README: "Derive slope and aspect tiles (`src/slope_tiles.py`) and earthworks volumes for trenches and platforms (`src/earthworks_pair.py`), each checked the same way." - Inputs & outputs: In: JSON file earthworks_receipt.json; command-line arguments. Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid). - Downstream impact: Used directly by 1 file: Test Earthworks (lidar). - Signatures: `class Ground`; `__init__(self, grid, oe, on, sp, xp)`; `h(self, x, y)`; `ground_from(tiles_dir, xp)`; `routes(e0, n0, heading, L1, theta, R, L2, w, d, oe=0.0, on=0.0)`; `centre(P, k, s, xp, piece=None)`; `positron(P, G, ks)`; `candidates(P, ks)`; `claim(P, k, X, Y, xp)`; `electron(P, G, ks)`; `trench_pair(P, G)`; `inside_poly(X, Y, vx, vy, xp)`; `platform_pair(poly_bng, level, G)`; `draw(rng, n, G, margin=5.0)`; `sweep(tiles_dir, seed=SEED, trenches=4000, seconds=20.0, batch=250, use_gpu=True, witness=3)`; `main(argv=None)` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in [JSON file earthworks_receipt.json; command-line arguments]; out []; crs [OSGB36 / EPSG:27700 (British National Grid)]; voltages [] - Edges: uses 1 estate file (import 1); used by 1; mentioned by 0 ### Test Cable Sweep - File: lidar/tests/test_cable_sweep.py (Python, 174 lines) · role test · stage output · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/tests/test_cable_sweep.py#L1-L174 - Page: https://code.globalgrid2050.com/explore-code/s/0035.html#f2 - Synopsis: A test in the tests folder of LiDAR that checks LiDAR Cable Sweep. It is built from the ground step (`ground`), the grid step (`grid`) and the routes step (`routes`). - What it achieves (comment): Tests for `src/cable_sweep.py` on synthetic ground with known lengths. Its code works with 132 kV and 33 kV. It writes `source.json`. - What it does: It tests cables. Defines 12 functions or classes, including ground, grid, routes, close, test_min_radius_rule. Uses libraries inspect, json, math, os, pathlib. Side effects: reads or writes files; starts processes. - Why it exists in the grid workflow: Domain stage sub33kv_design (path word 'cable'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: cables, 132kV, 33kV. - Inputs & outputs: Out: JSON file source.json. Voltage levels named: 132kV, 33kV. - Downstream impact: It is itself an entry point (test); no other file was found loading it. - Signatures: `ground(xp, z)`; `grid(n=401)`; `routes(rows, R=3.0, depth=1.0)`; `close(v, want, rel=1e-6)`; `test_min_radius_rule()`; `test_flat_plan_lengths()`; `test_plane_straight_and_arc()`; `test_ridge_kink_on_grid_line()`; `test_short_legs_shrink_fillet()`; `hilly(tmp_path, n=601, seed=5)`; `test_sweep_hilly(tmp_path)`; `test_bounded_by_seconds(tmp_path)` - domain_stage: sub33kv_design · commercial_user: EPC_contractor, ICP_grid_engineer · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out [JSON file source.json]; crs []; voltages [132kV, 33kV] - Edges: uses 1 estate file (sys-path 1); used by 0; mentioned by 0 ### Test Pair - File: lidar/tests/test_pair.py (Python, 167 lines) · role test · stage output · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/tests/test_pair.py#L1-L167 - Page: https://code.globalgrid2050.com/explore-code/s/0701.html#f3 - Synopsis: A test in the tests folder of LiDAR that checks LiDAR Pair GPU, using SHA-256. It makes tiles (`make_tiles`) and checks clean (`check_clean`). - What it achieves (comment): Tests for `src/pair_gpu.py` against a synthetic hilly grid. - What it does: It tests its inputs. Defines 16 functions or classes, including make_tiles, run, poke, test_header_layout, test_clean_tiles_annihilate. Uses libraries hashlib, inspect, json, os, pathlib. Side effects: reads or writes files; starts processes. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. - Inputs & outputs: In: JSON file tiles.json. - Downstream impact: It is itself an entry point (test); no other file was found loading it. - Signatures: `make_tiles(tmp_path)`; `run(d, gpu=False, **kw)`; `poke(path, row, col, delta_q=0, header=None)`; `test_header_layout(tiles)`; `test_clean_tiles_annihilate(tiles)`; `check_clean(r)`; `test_gpu_and_cpu_agree(tiles)`; `test_seeded_repeatable(tiles)`; `test_check_points_retest(tiles)`; `test_bad_sample_is_a_photon(tiles)`; `test_edge_mismatch_is_a_photon(tiles)`; `test_header_lie_is_a_photon(tiles)`; `test_nodata_counted_not_hidden(tiles)`; `test_receipt_and_tiles_json(tiles)`; `test_bounded_by_seconds(tiles)`; `test_main_synth(tmp_path)` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in [JSON file tiles.json]; out []; crs []; voltages [] - Edges: uses 1 estate file (sys-path 1); used by 0; mentioned by 0 ### Test Slope - File: lidar/tests/test_slope.py (Python, 119 lines) · role test · stage ingest · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/tests/test_slope.py#L1-L119 - Page: https://code.globalgrid2050.com/explore-code/s/0702.html#f1 - Synopsis: A test in the tests folder of LiDAR that checks LiDAR Slope Tiles, using SHA-256. It is built from the plane step (`plane`). - What it achieves (comment): Tests for `src/slope_tiles.py` on synthetic ground. - What it does: It tests its inputs. Defines 8 functions or classes, including plane, test_plane_has_no_photons_and_right_slope, test_class_edges, test_aspect_octants_point_downslope, test_crease_makes_photons_beside_the_crease_only. Uses libraries hashlib, inspect, json, os, pathlib. Side effects: reads or writes files; starts processes. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. - Downstream impact: It is itself an entry point (test); no other file was found loading it. - Signatures: `plane(pe, pn, n=65)`; `test_plane_has_no_photons_and_right_slope()`; `test_class_edges()`; `test_aspect_octants_point_downslope()`; `test_crease_makes_photons_beside_the_crease_only()`; `test_nan_marks_neighbours_nodata()`; `test_tiles_roundtrip_and_index(tmp)`; `test_decode_refuses_damage()` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out []; crs []; voltages [] - Edges: uses 1 estate file (sys-path 1); used by 0; mentioned by 0 ### LiDAR Cable Sweep - File: lidar/src/cable_sweep.py (Python, 454 lines) · role electrical · stage output · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/src/cable_sweep.py#L1-L454 - Page: https://code.globalgrid2050.com/explore-code/s/0034.html#f2 - Synopsis: A Python command-line tool that reads cable sweep receipt, cables and 132kV, using SHA-256. It loads cables (`load_cables`), routes meta (`route_meta`) and writes receipt (`write_receipt`). - What it achieves (comment): How long is a buried cable over real ground, counted two ways? Its code works with 132 kV and 33 kV. It accepts `--tiles`, `--seed` and `--routes`. - What it does: It loads cable sweep receipt, cables and 132kV. Defines 21 functions or classes, including to_host, Ground, __init__, h, ground_from. Uses libraries argparse, hashlib, json, math, os. Side effects: reads or writes files; starts processes. - Why it exists in the grid workflow: Domain stage sub33kv_design (path word 'cable'): inside-the-fence electrical and civil design below 33kV, which Ventus Ltd states is within its commercial execution boundary. Domain terms in the code: cables, 132kV, 33kV. - Inputs & outputs: In: JSON file cable_sweep_receipt.json; JSON file cables.json; JSON file source.json; command-line arguments. Voltage levels named: 132kV, 33kV. - Downstream impact: Used directly by 1 file: Test Cable Sweep (lidar). - Signatures: `to_host(a)`; `class Ground`; `__init__(self, grid, oe, on, sp, xp)`; `h(self, x, y)`; `ground_from(tiles_dir, xp)`; `min_radius(cables, kv, csa=CSA, when="installation")`; `plan(x0, y0, h0, legs, turns, R)`; `arc_point(x, y, h, kap, u, xp)`; `ragged(xp, counts)`; `electron(P, depth, G, ds=DS_E)`; `_F(u, xp)`; `crossings(P, G)`; `_stable_argsort_int(a, xp)`; `positron(P, G)`; `draw(rng, n, G, rule, margin=3.0, leg=(3.0, 300.0))`; `pair(D, G)`; `load_cables(path)`; `sweep(tiles_dir, seed=SEED, routes=40000, seconds=60.0, batch=2000, use_gpu=True, witness=32, cables=None, cables_path=CABLES)`; `route_meta(D, R, i, G)`; `write_receipt(tiles_dir, r)`; `main(argv=None)` - domain_stage: sub33kv_design · commercial_user: EPC_contractor, ICP_grid_engineer · canonical_status: unknown · essay_status: readme_derived - data_contracts: in [JSON file cable_sweep_receipt.json; JSON file cables.json; JSON file source.json; command-line arguments]; out []; crs []; voltages [132kV, 33kV] - Edges: uses 0 estate files; used by 1; mentioned by 0 ### LiDAR Cut Tiles - File: lidar/src/cut_tiles.py (Python, 154 lines) · role storage · stage output - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/src/cut_tiles.py#L1-L154 - Page: https://code.globalgrid2050.com/explore-code/s/0699.html#f2 - Synopsis: A Python module that works with cut grid (`cut_grid`), using EPSG:27700 and SHA-256. It encodes tile (`encode_tile`), decodes tile (`decode_tile`) and loads tiles (`load_tiles`). - What it achieves (comment): Cut a south-up 1 m height grid into .ght tiles, and decode them again. - What it does: It loads data. Defines encode_tile, decode_tile, cut_grid, load_tiles. Uses libraries hashlib, json, os, struct, datetime. Side effects: reads or writes files. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. - Inputs & outputs: In: JSON file tiles.json. Out: JSON file. Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid). - Downstream impact: Used directly by 2 files: LiDAR Build Site (lidar); Test Roundtrip (lidar). - Signatures: `encode_tile(heights, origin_e, origin_n)`; `decode_tile(blob)`; `cut_grid(grid, origin_e, origin_n, out_dir, site_name, source="")`; `load_tiles(out_dir)` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in [JSON file tiles.json]; out [JSON file]; crs [OSGB36 / EPSG:27700 (British National Grid)]; voltages [] - Edges: uses 0 estate files; used by 2; mentioned by 0 ### LiDAR Geotiff Read - File: lidar/src/geotiff_read.py (Python, 119 lines) · role ingest · stage transform - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/src/geotiff_read.py#L1-L119 - Page: https://code.globalgrid2050.com/explore-code/s/0700.html#f1 - Synopsis: A Python module that masks nodata (`mask_nodata`), using EPSG:27700. It reads geotiff (`read_geotiff`) and is built from the mosaic step (`mosaic`). - What it achieves (comment): Read EA DTM GeoTIFF chunks with tifffile and mosaic them into one grid. - What it does: Defines _geokeys, _raw_nodata, read_geotiff, mask_nodata, mosaic. Uses libraries logging, numpy, tifffile. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. - Inputs & outputs: Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid). - Downstream impact: Used directly by 2 files: LiDAR Build Site (lidar); Test Roundtrip (lidar). - Signatures: `_geokeys(tags)`; `_raw_nodata(tags)`; `read_geotiff(path)`; `mask_nodata(z, nodata=None)`; `mosaic(paths, e0, n0, width, height)` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: unknown · essay_status: readme_derived - data_contracts: in []; out []; crs [OSGB36 / EPSG:27700 (British National Grid)]; voltages [] - Edges: uses 0 estate files; used by 2; mentioned by 0 ### LiDAR Pair GPU - File: lidar/src/pair_gpu.py (Python, 371 lines) · role storage · stage output · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/src/pair_gpu.py#L1-L371 - Page: https://code.globalgrid2050.com/explore-code/s/0700.html#f2 - Synopsis: A Python command-line tool that reads pair receipt and tiles, using SHA-256. It reads ght (`read_ght`), writes ght (`write_ght`) and loads source (`load_source`). - What it achieves (comment): Height tile pair: do the .ght tiles say what the float64 source said? It accepts `--tiles`, `--source` and `--seed`. - What it does: It loads pair receipt and tiles. Defines 16 functions or classes, including read_ght, write_ght, synth, load_source, bilinear. Uses libraries argparse, glob, hashlib, json, math. Side effects: reads or writes files; starts processes. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. README: "Check on the GPU with two independent formulations and CPU witnesses (`src/pair_gpu.py`): every stored height against the source, heights between samples two ways, and shared tile edges." - Inputs & outputs: In: JSON file pair_receipt.json; JSON file source.json; JSON file tiles.json; command-line arguments. Out: JSON file tiles.json. - Downstream impact: Used directly by 2 files: LiDAR Earthworks Pair (lidar); Test Pair (lidar). Reached from 1 other entry point, including Test Earthworks (lidar). - Signatures: `read_ght(path)`; `write_ght(path, h, oe, on, spacing_mm)`; `synth(out, tiles_e=2, tiles_n=2, spacing_m=1.0, oe=400000, on=300000, seed=SEED)`; `load_source(npy)`; `bilinear(xp, g, gx, gy)`; `corners(H, t, u, v, xp)`; `two_lerps(h00, h10, h01, h11, fx, fy)`; `polynomial(h00, h10, h01, h11, fx, fy)`; `weights(h00, h10, h01, h11, fx, fy)`; `worst(xp, err, info, k=KEEP)`; `merge(kept, new)`; `to_host(a)`; `run(tiles_dir, source_npy, seed=SEED, points=1 << 22, seconds=20.0, batch=1 << 20, use_gpu=True)`; `check_points(tiles, Hh, oe, on, sp, rng)`; `write_receipt(tiles_dir, receipt)`; `main(argv=None)` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in [JSON file pair_receipt.json; JSON file source.json; JSON file tiles.json; command-line arguments]; out [JSON file tiles.json]; crs []; voltages [] - Edges: uses 0 estate files; used by 2; mentioned by 0 ### LiDAR Fetch Wcs - File: lidar/src/fetch_wcs.py (Python, 88 lines) · role storage · stage output · entry point - Source: https://github.com/Ventusltd/lidar/blob/2ddf7257e4847e5f387e03aaecbc1cc425c4e387/src/fetch_wcs.py#L1-L88 - Page: https://code.globalgrid2050.com/explore-code/s/0699.html#f4 - Synopsis: A Python command-line tool that fetches LiDAR terrain, using EPSG:27700 from Environment Agency. It fetches one (`fetch_one`) and fetches box (`fetch_box`). - What it achieves (comment): Fetch Environment Agency LiDAR Composite DTM 1m GeoTIFFs over WCS 2.0.1. - What it does: It fetches LiDAR terrain. Defines coverage_url, chunk_ranges, fetch_one, fetch_box. Uses libraries os, sys, time, urllib.request. Side effects: reads or writes files; makes network requests; starts processes. - Why it exists in the grid workflow: Domain stage site_feasibility (repository name word 'lidar'): substation-to-site feasibility (terrain, LiDAR and connection evidence before design), a journey named in Ventus Ltd's brief. Domain terms in the code: LiDAR terrain. - Inputs & outputs: In: data source: Environment Agency; command-line arguments. Coordinate systems named: OSGB36 / EPSG:27700 (British National Grid). - Downstream impact: Used directly by 1 file: LiDAR Build Site (lidar). - Signatures: `coverage_url(e0, e1, n0, n1)`; `chunk_ranges(lo, hi, step=CHUNK_M)`; `fetch_one(e0, e1, n0, n1, cache_dir, retries=3)`; `fetch_box(e0, e1, n0, n1, cache_dir, log=print)` - domain_stage: site_feasibility · commercial_user: IPP_developer, landowner_planner · canonical_status: supporting_data · essay_status: readme_derived - data_contracts: in [data source: Environment Agency; command-line arguments]; out []; crs [OSGB36 / EPSG:27700 (British National Grid)]; voltages [] - Edges: uses 0 estate files; used by 1; mentioned by 0