# Ground Desk · P-01

Ground Desk is the first tool on the Point clouds shelf, available as a **public preview** at `/ground-desk/`. It classifies ground in LAS/LAZ, provides local confidence and source-RGB review, and exports classified LAS, thinned ground, LandXML, an ASCII DEM, confidence imagery and a settings report. Independently verify surfaces before use; confidence is heuristic and checkpoint reports require professional review and signature.

## Workflow

1. Open one projected LAS or ordinary LAZ. LAS 1.0–1.4 point formats 0–3 and 6–8 are supported. Waveform formats and COPC are rejected.
2. Review the detected horizontal CRS, vertical identity and units. Complete matching metadata needs no declaration. A 2D CRS asks for Z-unit confirmation. Missing metadata requires a local projected-grid identity and matching-unit declaration. Geographic coordinates and differing horizontal/vertical units are rejected. There is no reprojection or unit conversion.
3. Enter ground spacing, tolerance and low-noise depth in native units. Cloth spacing defaults to one physical metre expressed in detected units until edited. Terrain presets change cloth rigidity; they do not change tolerance or ground spacing. Withheld points remain excluded even when resetting classification.
4. Extract ground. Inspect confidence, accepted ground, source RGB and elevation. Wheel zoom follows the cursor; drag or arrow controls pan. Focus the map for `+`, `-`, arrows and Home/Fit. Display reduction never changes classification or exports.
5. Optionally expand Independent checkpoint report and import P,N,E,Z,D CSV. Map descriptions and complete the professional declarations. Checkpoints sample the exact exported grid-TIN; they never change classification or fitting. Download the unsigned HTML report, CSV audit or JSON assessment.
6. Download the survey ZIP. Classified LAS retains original records and attributes, with intended classification/keypoint changes. LAZ exports are uncompressed LAS. Thinned ground is a separate subset. Unsupported DEM cells remain no-data and TIN gaps remain open.

## Local files and saving

All cloud bytes, checkpoint rows, descriptions, settings, review maps and exports stay on the user's computer. No account, upload, telemetry, remote imagery, application server or processing endpoint is used. The static host serves code and fonts at initial load. The local decoder is embedded in the worker bundle, so processing needs no fetches. `/ground-desk/*` has `connect-src 'none'`, `form-action 'none'`, no analytics-script allowance and no JavaScript eval permission. Blob workers and WASM compilation have narrow permissions for the decoder.

The tab retains working state in memory, without localStorage, IndexedDB or a service worker. Refreshing or closing clears it; download outputs first. Cancel terminates processing; export cancellation aborts the local writer. Reprocessing rereads the selected source and clears previous checkpoint assessments.

Report bug opens the standard separate site form. Only information deliberately entered and submitted there is sent. The desk does not attach files, filenames, checkpoint rows or settings to reports. No report is sent automatically.

Use current 64-bit desktop Chrome/Edge, HTTPS, ample RAM and disk for large clouds. Large native ZIP exports stream to a user-selected local file through File System Access; other browsers use small-package Blob downloads. Uncompressed LAS uses bounded reads but still retains classifications, indices and a global cloth/DEM in memory. Large LAZ retains compressed and decompressed buffers and needs considerably more memory. Browser allocation, canvas, index and disk limits still apply. The app does not silently crop or resample input to fit a cap.

## Source and rebuild

Pinned source: Point-Tools commit `6548e537892b98d7e31f28a5d76dd366144f785b`, package 0.5, classifier/native writer 0.3. The upstream repository remains read-only for this integration. Core classification, CRS, checkpoint, map, ZIP64, native LAS and export modules are copied without logic changes. Third-party notices and decoder/CSF licenses remain alongside the vendor assets; fonts use the site's existing self-hosted licensed copies.

Site-owned files are `index.html`, `style.css`, `desk-tokens.css`, `desk-chrome.js`, `build-worker.cjs` and the integration tests/documentation. The shell uses `shared/aa.css`, shelf navigation, Docs, Report bug and the Client-only footer. Functional map colors are retained. The catalog marks P-01 **Preview**, not a validated survey product. `noindex` remains while this first version is under review.

To refresh from the pinned source, copy the runtime modules listed in `build-worker.cjs`, plus `app.js`, `checkpoints.js`, `checkpoint-ui.js`, `review-map.js`, `zip64.js`, `large-export.js`, `large-las-stream.js`, `worker.js`, vendor files and licenses. Review source differences, update VERSION and the relevant regression fixtures, and keep the site-owned shell. Never copy the upstream standalone HTML or deployment ZIP over the adapted page. Those editions have different security/packaging requirements and are not served by this port.

After any worker input or decoder change, run:

```sh
node ground-desk/build-worker.cjs
node ground-desk/build-worker.cjs --check
```

The generated `offline-worker.js` embeds the current runtime and WASM and is used on HTTPS and when opening the site checkout from disk. Do not hand-edit it. No production build or backend is needed. Preserve the path-specific `_headers` policy and use the existing reviewed PR/Cloudflare preview release process. No GitHub Actions are added.

## Validation

From the repository root:

```sh
node ground-desk/test/run-all.cjs
node ground-desk/test/browser.cjs
node bug/test/run-all.js
```

Node checks cover binary preservation, CRS declarations, bounded LAS processing, native LAS streaming, ZIP/export output, checkpoint parsing/TIN/audit, confidence, seed order and review geometry. They run in a temporary directory so generated survey outputs are not published. Only small synthetic fixtures are committed.

Browser checks need Playwright, Chromium and Python's standard ZIP library. Set `PLAYWRIGHT_MODULE` and `CHROMIUM_PATH` if needed. The harness serves the actual Ground Desk CSP and exercises synthetic classification, LAS/LAZ formats 6/7, local ZIP and checkpoint downloads, map zoom, Docs and 1440/720/390px layouts. It asserts no processing/export network traffic, no outgoing request bodies, no runtime errors and valid ZIP CRCs/deliverables. Production may inject Cloudflare's analytics script; the harness permits only that expected CSP violation and verifies the request failed because of CSP. All other CSP violations fail the check. The local native-save dialog is not automated; small-package download fallback is exercised.

[VALIDATION.md](VALIDATION.md) contains historical upstream evidence, including its full-size LAS test, and is not a claim that this site port repeated that survey. Direct-file browser validation was blocked by this environment’s administrator policy; the supplied upstream file-compatible bundle is retained. Full-size capacity, large-LAZ capacity, human native-save dialog operation and independent survey accuracy remain unverified here. Read [METHOD.md](METHOD.md) and [checkpoint descriptions](CHECKPOINT_DESCRIPTIONS.md) before relying on deliverables.
