A browser-only prototype for preliminary forestry skyline clearance screening. It uses a simple straight-line skyline clearance model for v1 and is not a final engineered cable harvesting design tool.
npm install
npm run devThe app uses Mapbox GL JS when a public token is available, but the token is not hard-coded. LINZ hillshade tiles can also be enabled with a LINZ Basemaps API key.
- Copy
.env.exampleto.env. - Add your public tokens:
VITE_MAPBOX_TOKEN=your_mapbox_public_token_here
VITE_LINZ_API_KEY=your_linz_basemaps_api_key_hereWithout a token, the app opens in a no-map fallback mode with demo geometry so the clearance engine and tests still work.
Clearance calculations request fixed zoom 14, 512-pixel Mapbox Terrain-RGB tiles directly and cache decoded tiles in memory. This keeps terrain results independent of the visible basemap, map zoom, and Mapbox GL render timing. These requests use Mapbox's Raster Tiles API; use an uploaded GeoTIFF DEM when a controlled project-specific elevation source is required.
The site is deployed by GitHub Actions using .github/workflows/deploy-pages.yml.
-
In repository settings, set Pages source to GitHub Actions.
-
Add these repository secrets so production builds can render public map tiles:
- VITE_MAPBOX_TOKEN (required for Mapbox basemap and fixed-resolution Terrain-RGB sampling)
- VITE_LINZ_API_KEY (optional, for LINZ hillshade)
- VITE_LINZ_LDS_KEY (optional, for LINZ parcel overlays)
- VITE_SENTINEL_INSTANCE_ID (optional, for Sentinel-2 imagery)
If VITE_MAPBOX_TOKEN is missing in CI, the deployed app still loads but runs in no-map fallback mode.
If these values are not set in this repository, the deploy workflow will attempt to read the same public keys from SchroderHill/desig_portal (from its index.html) as a fallback.
npm testThe prototype uses a simple user-defined geometric deflection model for preliminary screening. It does not calculate true rope tension, safe working load, or cable mechanics.
Preliminary skyline clearance screening only. Not a final cable harvesting plan. Final setup must be confirmed by a competent cable harvesting operator or planner.