Real-World Utility GIS → Playable 3D Worlds
GIS Level Generator: Technical Specifications & How-To Guide
Bridge the gap between utility GIS work orders (ArcGIS / SAP pole tables, as-is vs. to-be framing)
and walkable 3D GridScaper environments. The generator combines private utility asset layers with
VoxCity-style OpenStreetMap & public DEM terrain imagination, optional VoxGrid LiDAR tree canopy obstacles,
and Street View / Google Earth ground-truth vibe profiles.
2 · Built-In Fictional GIS Sample Packages (Auto-Loaded)
GridScaper ships with three ready-to-play fictional utility GIS packages in
runtime/sample-gis-package.js. Opening /gis-job-walk/
automatically compiles and boots Sycamore Canyon 12kV Reconductor (WO-SCE-4821) so you can test walking, jumping,
free-flight inspection, Work Order plan comparison, and live biome/lighting/weather switching immediately.
compileGisLevel)
SCHEMA v1 VALID
3 · How-To: Run a Virtual Job Walk in the App
Step 1: Open the GIS Job Walk Studio
Click GIS Level Studio on the main menu (or visit /gis-job-walk/). The default fictional package (Sycamore Canyon 12kV Reconductor) loads and compiles automatically.
Step 2: Walk, Jump, or Fly the Alignment
Use WASD to walk the terrain, Space to jump onto low surfaces (such as the crew pickup truck tailgate or over low fences),
and V to toggle free drone flight (Space to ascend, C to descend). Use the Utility Pole Roster
in the top-left drawer to teleport directly to any SAP pole in the work order.
Step 3: Review the Work Order & String the Circuit
Walk up to the lowered tailgate of the crew pickup truck and press E (or click the glowing Work Order sheet).
Compare Plan A (Direct Shortcut — Denied), which is flagged by the VoxGrid LiDAR canopy clearance check,
against Plan B (Engineered Work-Order Alignment — Approved). Select Plan B, set the proposed poles, string the 3-phase spans,
and close the Source Disconnect lever to energize Canyon Fire Station #14 and the Sycamore Municipal Pump Station.
4 · How-To: Export Utility GIS Data from ArcGIS Pro / QGIS
You can drop a .geojson, .json, or .csv file directly into the
GIS Package Studio drawer in /gis-job-walk/.
Option A: Simple CSV Pole Export (Fastest)
Export your pole attribute table to CSV from ArcGIS Pro, ArcGIS Online, or Excel. Only two coordinate columns
(lon,lat in WGS84 or x,z / easting,northing in planar feet/meters) are required:
id,lon,lat,height_ft,pole_class,role,status,crossarms,transformer_kva,streetlight POLE-101,-117.8542,33.7880,50,1,source,existing,2,75,false POLE-102,-117.8538,33.7880,45,2,distribution,existing,1,0,true POLE-103,-117.8534,33.7881,45,2,distribution,proposed,2,25,true POLE-104,-117.8530,33.7881,40,3,customer,existing,1,50,false
Option B: Full GeoJSON FeatureCollection or Package JSON
Export Point features for poles, LineString features for conductor spans, roads (highway),
and streams (waterway), and Polygon features for buildings. Tag poles with
"status": "existing" (retained as-is) or "status": "proposed" (interactive work-order sites).
5 · How-To: Progressive Enhancement Layers (All Optional)
Missing rich data sources is never a show-stopper. Every layer beyond bare pole coordinates is optional and progressively enhances the compiled 3D digital twin:
Bare Pole Coordinates
2+ pole coordinates (WGS84 lon/lat or State Plane x/y). Source, customer, spans, road, and walkable ground are auto-inferred.
Utility Hardware Specs
Pole height (ft/m), class, framing (h-frame, distribution-pole), crossarms, kVA transformers, cutouts, risers, guys & streetlights.
VoxCity OSM + Public DEM
Live Overpass buildings, roads & streams plus coarse public DEM upsampled via imagineDetailedTerrain() with graded road beds and carved creeks.
VoxGrid LiDAR Canopy
Drop a VoxGrid .csv (x,y,z,label) to cluster high-vegetation voxels into 3D trees and NESC/GO-95 span clearance obstacles.
Street View & Earth Vibe
Auto-generated Street View & Google Earth 3D camera vantages plus vibeProfile palette, roof style, foliage, and pole hardware overrides.
6 · Technical Specification: GIS Package Input Schema
compileGisLevel(input, options) accepts a CSV string, an array of pole objects, a standard GeoJSON
FeatureCollection, or a structured GIS package object with the following top-level fields:
| Field | Type | Required | Specification & Fallback Behavior |
|---|---|---|---|
poles |
Array<Object|Feature> |
Yes (≥ 2) | Utility support locations. If no pole has role: "source" or role: "customer", the first pole becomes the feeder source and the last pole becomes the service point. |
spans |
Array<{id, a, b, status}> |
Optional | Overhead conductor edges referencing pole IDs (a/from to b/to). Auto-chained along the pole sequence when omitted. |
buildings |
Array<Polygon> |
Optional | Building footprints in [[lon, lat], ...] or local {x, z, width, depth, height, tags}. Customer poles automatically bind to nearby buildings or synthesize a service building. |
roads |
Array<LineString> |
Optional | Road centerlines with optional OSM highway tag or explicit width (meters). Grades terrain flat across the road bed. |
waterways |
Array<LineString> |
Optional | Streams, creeks, or concrete channels. Carves a depression channel into the upsampled terrain grid and renders water segments. |
coarseDemGrid |
{rows, cols, values} |
Optional | Coarse public DEM elevation array (meters ASL). Upsampled by imagineDetailedTerrain() into a 32×32 walkable heightfield relative to the site datum. |
voxels |
string (CSV) | Array |
Optional | VoxGrid point-cloud/LiDAR voxel table (x,y,z,label). Clusters vegetation cells into authoredTrees and 3D span clearance boxes. |
vibeProfile |
Object |
Optional | Ground-truth styling overrides: architectureStyle, foliageTypes, paletteSwatches, landmarks, and poleOverrides. |
7 · Technical Specification: Utility Pole & Hardware Mapping
mapUtilityPoleAttributes(rawProps, index, options) translates utility GIS / SAP attributes into GridScaper 3D procedural structures
and attaches root.userData.gisInspection metadata to every 3D support:
| GIS Property / Alias | Mapped Field | Rule & 3D Representation |
|---|---|---|
height_ft, pole_height_ft, length_ft |
pole.h (meters) |
Applies standard utility setting depth rule (aboveGroundFt = totalFt * 0.9 - 2) unless setting_depth_applied: true, then converts feet to meters (1 ft = 0.3048 m). |
status, state, work_type |
pole.status |
"existing" / "as-is" poles spawn fixed in the world. "proposed" / "to-be" / "install" poles become interactive Work Order sites. |
structure_type, supportModel, framing |
pole.supportModel |
Maps to distribution-pole, h-frame, transmission-tower, portal-gantry-tower, v-crown-tower, or staggered-arm-tower. |
crossarms, crossarmCount |
equipment.crossarmCount |
1 to 3 wood/composite crossarms with pin insulators (defaults to 2 on source poles, 1 on tangent poles). |
transformer_kva, kva, transformer |
equipment.transformer |
Mounts a pole-top distribution transformer can + primary fuse cutout at h - 2.2m. |
streetlight, luminaire |
equipment.streetlight |
Mounts a mast-arm cobrahead luminaire at min(6.5m, h - 1.5m). |
guy (boolean | {dx, dz}) |
equipment.guy |
Renders an anchored down-guy wire along vector (dx, dz). |
8 · Technical Specification: Biomes, Lighting & Weather Presets
GridScaper uses six geographic biome presets (never campaign level nicknames) and allows live reconfiguration of
lighting and weather at any time via configureGisEnvironment(level, { biome, lighting, weather }):
| Biome Preset Key | Surface Kind | Ground & Road Swatches | Foliage Species | Default Building Style |
|---|
Live Lighting & Weather Matrix
| Preset Type | Key | Parameters Configured |
|---|---|---|
| Lighting | dawn, day, golden-hour, dusk, night |
Configures theme, directional sunColor, sunIntensity, hemisphere ambientIntensity, tone-mapping exposure, and base fogColor. |
| Weather | clear, haze, overcast, fog, windy |
Configures exponential fogDensity, camera viewDistance, horizonHaze, windStrength, cloudCover, and overcast sunMultiplier. |
9 · Technical Specification: Coordinate Projection & Terrain DEM Imagination
Metric Tangent-Plane Projection (createMetricProjection)
When pole coordinates are supplied in WGS84 decimal degrees ([-180..180, -90..90]),
createMetricProjection(points, options) centers the local origin (0, 0) at the centroid of the pole alignment
and projects coordinates to local meters (1 unit = 1 meter) using latitude-corrected equirectangular scaling:
mPerDegLat = 111320.0 mPerDegLon = 111320.0 * cos(originLat * PI / 180) // +X is East, -Z is North (+Z is South) x = (lon - originLon) * mPerDegLon z = -(lat - originLat) * mPerDegLat
For California NAD83 State Plane exports (EPSG:2225–2230 in US Survey Feet or EPSG:26941–26946 in meters),
createMetricProjection performs automatic Lambert Conformal Conic (2SP) State Plane ↔ WGS84 datum alignment using an explicit
{ epsg: 2229 }, companion .prj WKT file, or coordinate range auto-detection—so unprojected State Plane Shapefiles and CSVs
align directly with WGS84 OSM buildings/roads and DEM terrain. Pass { crs: 'planar', units: 'ft' | 'm', northingToNegativeZ: true } to force purely local planar coordinates.
Public DEM Terrain Imagination (imagineDetailedTerrain)
Public digital elevation models (USGS 3DEP / SRTM / Open-Elevation) are often coarse over a single distribution span.
imagineDetailedTerrain(coarseDemGrid, contextFeatures, options) normalizes the coarse grid to the local site datum,
bicubically upsamples the macro slope onto a 32×32 heightfield, synthesizes biome-scaled micro-relief, flattens road corridors
and building pads, and carves stream channels along OSM waterways.
10 · Runtime JavaScript API & Offline CLI Reference
import {
compileGisLevel,
compileGisLevelAsync,
configureGisEnvironment,
applyGroundTruthVibe,
fetchVoxCityContext,
imagineDetailedTerrain,
ingestVoxGridObstacles,
parseShapefile,
parseLasPointCloud,
parseLazPointCloud,
registerLazDecoder,
parseNpyVoxelGrid,
statePlaneToWgs84,
wgs84ToStatePlane,
parsePrjCrs,
evaluateGo95Clearances,
GO95_CLEARANCES,
inferBiomeFromContext,
evaluateGisSandboxState
} from './runtime/gis-level-generator.js';
import { SAMPLE_FICTIONAL_GIS_PACKAGE } from './runtime/sample-gis-package.js';
// 1. Synchronous compile from a fictional or exported GIS package (auto-infers biome when omitted)
const { ok, level, summary, diagnostics } = compileGisLevel(SAMPLE_FICTIONAL_GIS_PACKAGE, {
biome: 'mountains', // 'suburban' | 'urban' | 'mountains' | 'desert' | 'coastal city' | 'agricultural'
lighting: 'golden-hour', // 'dawn' | 'day' | 'golden-hour' | 'dusk' | 'night'
weather: 'clear', // 'clear' | 'haze' | 'overcast' | 'fog' | 'windy'
anonymize: false // Set true to replace SAP/FLOC pole IDs with pole-01, pole-02...
});
// 2. Live post-setup lighting & weather reconfiguration
configureGisEnvironment(level, {
lighting: 'night',
weather: 'fog'
});
// 3. Live Clearance & Catenary Sag Sandbox evaluation
const sandbox = evaluateGisSandboxState(level, {
tension: 1.15,
poleOverrides: {
'pole-03': { height_ft: 55, dx: 2.0, dz: -1.5 }
}
});
// 4. Async compile with live Overpass OSM + Open-Elevation DEM fetch
const asyncResult = await compileGisLevelAsync(myPoleGeoJson, {
biome: 'suburban',
fetchPublicContext: true
});
Offline CLI Compiler (scripts/compile-gis-level.mjs)
You can also compile GeoJSON, CSV, or ESRI Shapefiles (.shp + .dbf + optional .prj) alongside optional
VoxGrid LiDAR canopy files (.csv, .las, .laz via optional WASM decoder, .npy) directly from the terminal.
Overpass and DEM responses are disk-cached next to the compiled output (.gis-cache/) and support custom endpoints or strictly --offline batch runs:
# Compile the built-in Sycamore Canyon fictional GIS package npm run gis:compile -- --sample sycamore-canyon --out levels/generated/sycamore-canyon.json # Compile a NAD83 State Plane Shapefile with .prj, .laz LiDAR, custom endpoints & disk cache npm run gis:compile -- \ --input ./my-work-order.shp \ --dbf ./my-work-order.dbf \ --prj ./my-work-order.prj \ --epsg 2229 \ --voxels ./usgs-3dep-tile.laz \ --laz-decoder laz-perf \ --biome mountains \ --lighting golden-hour \ --weather clear \ --fetch-context \ --overpass-url https://overpass.kumi.systems/api/interpreter \ --dem-url https://api.open-meteo.com/v1/elevation \ --cache-dir ./.gis-cache \ --anonymize \ --out levels/generated/custom-job-walk.json
11 · Architectural Decisions Made (Issue #157)
1. Client-Side Zero-Upload Architecture & Opt-In Anonymization
Real utility GIS exports often contain internal SAP functional locations, work order numbers, and customer service drops.
All parsing (GeoJSON, CSV, binary ESRI .shp/.dbf, binary .las and .npy) runs 100% locally in browser memory
or via the local Node CLI with zero backend uploads. When anonymize: true is enabled (default for ad-hoc imports),
raw asset tags are scrubbed into generic labels (pole-01, pole-02) while preserving full inspection attributes when explicitly allowed.
2. Progressive Enhancement Tiers (Never Block on Missing Layers)
Rather than requiring a rigid multi-layer GIS bundle, the compiler operates on progressive tiers:
Tier 0 requires only 2+ pole coordinates; Tier 1 maps utility attributes (height, class, framing, voltage, status);
Tier 2 fuses public OSM buildings/roads/waterways and upsamples public DEM elevation grids;
Tier 3 ingests VoxGrid LiDAR canopy obstacles (.csv, .las, .npy) and Street View / Google Earth vibe profiles.
3. Sensible Geographic Biome Presets & Auto-Inference
Instead of coupling generated levels to campaign story nicknames, we standardized six geographic presets:
suburban, urban, mountains, desert, coastal city, and agricultural.
When the caller does not specify a biome, inferBiomeFromContext() inspects DEM elevation/slope, coastal proximity, building density,
and land-use tags to select the matching preset automatically, while keeping lighting and weather live-reconfigurable post-setup.
4. Public DEM Terrain Imagination (imagineDetailedTerrain)
Public 10m–30m DEM grids are too coarse for a 150m utility job walk on their own. We chose a hybrid approach: normalize the coarse public DEM to the local site datum, bicubically upsample macro slope onto a 32×32 heightfield, add biome-tuned micro-relief, flatten road corridors and building pads, and carve stream channels along OSM waterways.
5. GO-95 / NESC Setting Depth & Catenary Clearance Modeling
Total pole lengths in feet (e.g., 45ft, 50ft, 75ft) are converted to above-ground attachment heights using standard
embedment depth (10% + 2 ft, clamped to 1.8m–3.2m). All four Job Walk modes (First-Person / Drone Walk,
As-Is vs. To-Be Diff, Live Clearance & Sag Sandbox, and Tailgate Work Order) share the exact same catenary sag and cylinder/box clearance solver.
6. Work Order Synthesizer (1 Approved + 2 Denied Plans)
To make imported GIS alignments playable as tactical GridScaper puzzles on the crew truck tailgate, the compiler synthesizes
an Approved Plan along the engineered proposed alignment alongside two contrasting Denied Plans
(a direct chord that violates canopy/roof clearance and an under-built pole class option), plus staged pickup + bucket trucks, traffic cones,
jumpable 0.92m parcel fences, and the interactive crew boombox.
12 · Open Questions, Trade-Offs & Future Considerations
| Topic | Current Implementation & Trade-Off | Open Question / Future Enhancement |
|---|---|---|
| State Plane EPSG Datum Transforms | Automatically detects WGS84 degrees vs. planar feet/meters and centers a local tangent plane at the pole centroid. |
If a user mixes WGS84 OSM context with an unprojected NAD83 State Plane Shapefile (e.g., EPSG:2229 California Zone 5 ft) without a .prj transform,
should we bundle lightweight proj4 definitions for California EPSG zones 2225–2230 so mixed-CRS layers align automatically?
|
Compressed LiDAR (.laz) vs. Uncompressed (.las / .npy) |
Supports zero-dependency binary LAS 1.2–1.4 point formats 0–3, NumPy .npy 3D occupancy grids, and VoxGrid CSVs in the browser.
|
USGS 3DEP raw tiles are frequently distributed as LAZ-compressed archives. Should we add an optional WASM laz-perf decoder worker
for direct .laz drag-and-drop, or keep preprocessing in Python VoxGrid / QGIS?
|
| Public Overpass & Elevation API Rate Limits |
fetchVoxCityContext queries public Overpass and Open-Elevation endpoints with graceful fallback when offline or rate-limited.
|
For enterprise utility teams running batch compilations behind a corporate proxy, should we support a configurable local tile/DEM endpoint
in compile-gis-level.mjs or cache fetched OSM/DEM responses to disk beside the compiled level?
|
| Multi-Circuit Underbuild & Line Devices |
Maps distribution-pole, h-frame, and 4 transmission lattice tower archetypes plus crossarms, transformers, fuse cutouts, risers, streetlights, and guys.
|
How deep should secondary/telecom underbuild and automated switching devices (IntelliRupters, SCADA reclosers, capacitor banks, voltage regulators) go in the 3D clearance solver—should telecom attach heights have separate GO-95 communication-space clearance rules? |
| Street View / Earth Ground-Truth Automation |
Generates exact Street View & Google Earth vantage deep-links per pole and accepts a structured JSON vibeProfile or user reference photos.
|
To respect Google Maps Platform Terms of Service, no automated scraping is performed by default. Should we add an optional official Street View Static API key hook for teams with enterprise Google Maps credentials to auto-populate pole reference thumbnails? |