Survey Outlier Cleaner

Flags survey points that sit above or below the local ground formed by their neighbours (bad shots, Z = 0 points, canopy or roof hits). Uses a robust local plane fit, so slopes are not mistaken for errors. Nothing is deleted: mesh the Clean points and review the Outliers.

Site Analysis Nickname: SurveyClean

Overview

Flags survey points that sit above or below the local ground formed by their neighbours (bad shots, Z = 0 points, canopy or roof hits). Uses a robust local plane fit, so slopes are not mistaken for errors. Nothing is deleted: mesh the Clean points and review the Outliers.

Inputs (5)

  • Points (Point): Survey points (e.g. from a DWG survey).
  • Neighbours (Integer): Neighbours used to estimate the local ground around each point. Raise (e.g. 20) for sparse surveys.
  • Threshold (Number): How many local scatters (robust standard deviations) a point may sit off the local ground before it is flagged.
  • Min Deviation (Number): Never flag deviations smaller than this (model units, e.g. metres).
  • Passes (Integer): Re-check passes. Pass 2 ignores points flagged in pass 1, so clustered errors cannot vouch for each other.

Outputs (7)

  • Clean (Point): Points that agree with their neighbours — use these to build the mesh.
  • Outliers (Point): Flagged points, for review.
  • Deviation (Number): Signed distance of every input point from its local ground (+ above, - below).
  • Score (Number): Deviation divided by the local scatter for every input point (flagged when > Threshold).
  • Flags (Boolean): True for every input point that was flagged (same order as Points; use with Cull Pattern).
  • Colors (Colour): Preview colour per input point: grey = clean, red = above ground, blue = below ground.
  • Info (Text): How the component works and how to tune it.

Method, assumptions and simplifications

The same notes appear in the component's Info output.

Method

  1. For each point, the Neighbours (K, default 12, minimum 4) nearest points in plan (XY) are found with an R-tree.
  2. A local ground plane z = a + b·dx + c·dy is fitted to the neighbours by least squares (falling back to a line fit for collinear neighbours, e.g. a road string, and to the median for a single cluster).
  3. Neighbours whose residual exceeds max(3 × MAD, Min Deviation) are dropped and the plane is refitted; MAD is the median absolute deviation × 1.4826 (a robust standard deviation).
  4. Deviation = point Z minus the plane at the point; Score = |Deviation| / max(MAD, Min Deviation / Threshold). A point is flagged when Score > Threshold (default 3) and |Deviation| > Min Deviation (default 0.3).
  5. Passes (default 2, maximum 5) repeat the test with flagged points removed from the neighbour pool, so clusters of bad shots cannot support each other; flags come from the last pass.
  6. Deviation, Score, Flags and Colors follow the input list item by item; invalid points get empty values and Flag False, and a warning gives their count.

Assumptions

  • Ground varies smoothly over the K-neighbour scale, so a local plane represents it.
  • Min Deviation is in model units (metres).

Simplifications and limits

  • Breaklines (kerbs, walls, retaining edges) can be flagged because a plane cannot follow a step.
  • Nothing is deleted: Clean and Outliers split the input; review Outliers before meshing.

Workflow

  • Survey points (DWG import) -> Points; Clean -> Delaunay mesh or terrain components; Flags -> Cull Pattern.

References

  • Rousseeuw P.J. and Croux C. (1993), Alternatives to the median absolute deviation, Journal of the American Statistical Association 88: MAD × 1.4826 as a robust standard deviation.