# Ground Desk 0.5 method

Ground Desk ports the serial upstream [jianboqi/CSF](https://github.com/jianboqi/CSF) cloth solver at commit `d5952dade8011136a40544d78d970c8c959a10ba` (Apache-2.0). Comparison uses cloth-simulation-filter 1.1.7 with `OMP_NUM_THREADS=1`. It is an adaptation, not an unmodified upstream implementation.

Existing native noise cleanup and valid last/only return preference produce one native lower seed per ground cell. One robust joint affine terrain trend is fitted to native seed differences over the whole survey, with conditioning, trimmed residual and spatial-coverage checks. The fitted trend is applied only when reliable and `hypot(ax, ay) × native cloth spacing > ground tolerance`. Otherwise the cloth uses raw native heights. Fitted and applied coefficients, activation reason, predicted vertical change and threshold are recorded in the report. An applied fixed trend is subtracted at native seed X/Y before physical metre-based cloth simulation and restored at native query X/Y. This adaptation avoids coarse cloth collision sampling bias on steep planar terrain; it does not prove accuracy on curved terrain, cliffs or predominantly elevated surfaces.

The cloth is globally anchored, with a physical 1 metre default spacing, time step 0.65, at most 500 iterations and slope postprocessing enabled. Terrain presets select rigidness 3/2/1 for flat/rolling/steep. Every eligible native point is tested by absolute vertical distance to the four-node bilinear cloth surface, strictly below the chosen native ground tolerance. Cloth support affects confidence, never silently excludes an eligible native point or fills DEM gaps. Original coordinates and source attributes remain untouched.

Thinned ground retains one accepted native point per occupied fine cell, selected by minimum cloth residual. DEM cell-centre heights are derived from that native representative and a supported local native-ground plane, not copied from cloth nodes. No accepted native point means no DEM cell. Optional output smoothing changes only the derived DEM; cloth slope postprocessing is a separate classification operation. Key points and adjacent-cell grid TIN retain the existing native export conventions.

Confidence is relative and uncalibrated: accepted native density, local occupied support, cloth residual, derivative support, four-node collision coverage, convergence and trend-fit reliability. Weak trend fits and unsupported/nonconverged cloth support cannot receive a high confidence label. It is not a survey accuracy statement.

Validation includes synthetic terrain/roof truth, serial upstream parity and the complete supplied SH71 survey. Ten RGB-confirmed pavement bands across five sections over approximately 5,000 feet retain 2,739/2,739 occupied native 1-foot cells and 35,383/35,503 eligible points. A broader road-transition band retains 552/580 SW and 629/653 NE cells; a flat SW lane subset retains 339/339. Global and cropped/context-specific cloth origins can produce different nearest-seed collisions near raised transitions. This lattice/context dependence is a method limitation, not a coordinate translation. No surveyed accuracy is inferred from these coverage checks.

Serial upstream compatibility intentionally preserves Rasterization fallback BFS visited-state carryover into slope postprocessing. Eighteen matched native-seed cases covering 177,356 points have zero class differences, maximum cloth-node difference 5.55e-17 metres and native sampled elevation difference 3.65e-16 feet. The solver follows upstream visit ordering rather than introducing a separate edge smoothing rule.

Full-cloud browser processing and native-preserving ZIP export are verified. Global convergence, iterations, maximum movement, fitted/applied trend and activation reason are exported in report.json. Nonconvergence, weak trend fits or partially gap-filled four-node cloth support cap confidence below the high band without changing ground tolerance or silently rejecting points.

## Cleanup and export conventions

Coarse spatial support screens isolated points using occupied neighboring cells; within the fine grid, low points more than the declared noise depth below median neighboring minima are marked class 7. Counts are rebuilt before a separate isolated-outlier pass (class 18). Sparse valid patches or deep excavations can resemble noise and require review. Withheld observations remain excluded; existing class 7/18 remains excluded when classification reset is off. Every original record remains in full classified LAS. Eligible points outside ground tolerance receive class 1 when resetting; unrelated original classes can remain when reset is off. Rejected original class 2 is cleared. Valid last/only returns are preferred within each fine cell; invalid return fields fall back to all eligible points.

Thinned and model-keypoint LAS preserve native XYZ. Model keypoints use error-controlled hierarchical bilinear raster simplification at half the ground tolerance, retaining gaps/boundaries. This residual bounds that raster simplification, not an arbitrary downstream native-point Delaunay TIN or surveyed accuracy. Output smoothing is a supported 3×3 median of the derived raster and never changes measured LAS coordinates.

LandXML 1.2 emits northing/easting/elevation (Y X Z) at DEM cell centres in Meter/Foot/USSurveyFoot units. Faces join only adjacent occupied cells with at most one-cell diagonals, leaving no-data gaps open. This is a grid-derived TIN. ESRI ASCII DEM rows and confidence PNG rows run north to south; ASCII uses lower-left corner origin and −9999 no-data, PGW uses the top-left pixel centre and negative Y spacing. Source WKT is preserved and included in ground/confidence PRJ sidecars when available. No projection or unit conversion is applied to output coordinates.

Runtime LAS reads are bounded 32 MB chunks. Cleanup/finishing tile halos provide native context, but one globally anchored cloth classifies the complete survey and each eligible native record is committed once. ZIP64 streams full classified LAS, native subsets, ASCII and XML to a local destination. Original source order, scales, offsets, attributes, extra bytes and VLR/EVLR metadata are preserved; classification/keypoint flags and regenerated count/bounds header fields are intentional changes. LAZ exports are uncompressed LAS. Large LAZ decoding remains a full-buffer WASM path, so large-LAS validation does not establish equivalent LAZ capacity.

## Independent exported-surface assessment

PNEZD checkpoints are independent validation only. Exact Easting/Northing is sampled barycentrically on exported final DEM-centre LandXML faces (a,b,c) and (b,d,c). Each triangle needs three finite vertices; there is no extrapolation, gap bridging or nearest-point substitution. Audit records retain node IDs, weights, native coordinates, category, residual and reasons. Surface-minus-checkpoint residuals are converted from declared native m/ft/us-ft to centimetres. Under-resolved geometry and unrepresentable residuals cannot produce eligible claims.

ASPRS Edition 2, Version 2 (2024) vertical methods apply only to this exported surface. Combined RMSE is the root-sum-square of residual RMSE and documented surveyor vertical RMSE. Both NVA and VVA require a declared product class and checkpoint survey RMSE no greater than half that class for standards-method eligibility. NVA compares pooled combined RMSE to the class; VVA remains as found without observed-RMSE pass/fail. At least 30 checkpoints are required per applicable assessment. Area-based NVA recommendations increase from 30 to 120; agreed deviations above the 30 minimum require producer/user evidence. Independence, datum, units and distribution require professional review.

Empirical absolute-error P95 uses Hyndman-Fan type 7 linear interpolation at 0.95(n-1), not a 1.96 multiplier. Blank Description criteria are as found. Unchanged NVA residuals above three pooled targets block eligibility until corrected/recalculated or justifiably excluded. Mean bias above 25% needs investigation and documented producer/user acceptance if retained. Every original row and measurable pre-exclusion baseline remain auditable. This unsigned report does not certify classified-cloud accuracy, horizontal accuracy or full 3DEP compliance.

Package version 0.5 adds local review navigation and checkpoint markers; version 0.4 added independent checkpoint reporting. Classifier/native LAS writer version 0.3 is unchanged; exported LAS Generating Software identifies that engine, while report.json records both package and classifier versions. The full-cloud classification validation above therefore remains applicable to the unchanged engine.
