Skip to content
LidarKit

Ground classification

Find the ground points in a LAS or LAZ file with the Simple Morphological Filter (SMRF) — the same algorithm and the same result as PDAL's filters.smrf. Runs on your machine, no upload.

Drop a LAS or LAZ file to find the ground

or choose a file

Ground (2) and non-ground (1) · nothing leaves your machine

No upload. Processing runs in a Web Worker on your device — this app has no server component and no upload endpoint. How it works

What it does

Ground classification is the step every terrain product depends on. A DTM, a contour set, a volume, a height-above-ground for trees or buildings — each needs to know which points are the earth and which are standing on it. This tool answers only that question: every point it filters becomes class 2 (ground) or class 1 (not ground), and the rest of the file is written back untouched.

The right settings depend on the site, so they are not guessed up front. The file is read once, and a map of the result appears: brown where the points are ground, grey where they are not. Changing the window, cut, slope or threshold redraws it in a fraction of a second — on a 110 million point survey, 0.2 to 0.3 s — because only the grid is recomputed, not the file. When the map looks right, the file is read once more and every point is labelled with those settings. The map is drawn from a sample of up to two million points, which receive exactly the classes the output gives them.

SMRF works on a grid of the lowest point in each cell, in four steps:

  1. Minimum surface. The lowest elevation in every cell is taken, and empty cells are filled from their eight nearest neighbours.
  2. Low outliers. The surface is turned upside down and filtered once, which finds isolated pits — a stray reflection below the ground, a multipath return — so they cannot drag the ground model down.
  3. Progressive opening. The surface is opened with a window that grows one cell at a time up to the maximum radius. At each step, a cell that drops by more than slope × cell × radius is marked as an object. Terrain can only fall away gradually, however wide the window gets; a roof disappears all at once in the step whose window first spans it. That difference is the whole filter.
  4. Provisional DEM and threshold. Object and outlier cells are removed and refilled from the ground around them. Each point is then ground if it lies within threshold + scalar × slope of that surface, where the slope term relaxes the test on steep ground to absorb small positional errors.

Verified against PDAL

This is a port of PDAL 2.10's SMRF filter rather than a reimplementation of the paper, and it is checked by running native PDAL on the same file and comparing the classification of every point.

CloudPointsGroundPoints that differ
Airborne LiDAR, Brussels city centre, defaults5,850,13028.6%0
Same, 0.5 m cell, 30 m window, cut, ground-only, first returns5,850,13026.7%0
Drone photogrammetry, urban square31,002,88427.1%0
Drone photogrammetry, residential block26,134,16732.6%0
Drone photogrammetry, industrial site49,716,73666.9%0

Getting to zero needed more than the algorithm. When an empty cell is filled from its eight nearest neighbours, the cells of a regular grid are very often tied for eighth place, and which of them is chosen depends on the internal layout of the search tree. So the tree PDAL builds is reproduced too, down to its split rule and the order it visits cells in — otherwise a few tenths of a percent of points come out differently.

The parameters

ParameterDefaultChange it when
Cell1 mThe ground is sampled much more or much less densely than one point per square metre.
Window18 × cellBuildings are wider than about twice this. Too small and large roofs are called ground; much larger and real terrain features start being removed with them.
Slope0.15The terrain is steep. Raise it for hillsides and embankments; lower it to cut low objects more aggressively on flat sites.
Threshold0.5 mLow vegetation or kerbs should be excluded from ground (lower it), or the cloud is noisy (raise it).
Scalar1.25Steep ground is being split into ground and non-ground stripes.
Cut0 (off)Very large buildings stand on strongly sloping terrain, where a wide enough window would also flatten hills.

Where to look when checking the result

  • The largest roofs. A roof the window cannot span is classified as ground in its middle. The map makes this obvious — a brown patch on top of a building — and the fix is a wider window: drag it up until the roof turns grey.
  • Stepped buildings that fill the capture. When a survey is cropped tightly around one building, with only a few metres of ground at its edge, and the roof comes down in terraces — a main roof, a lower annex, then the yard — the filter can take the building away one terrace at a time. Each step then looks like a slope rather than a wall, and the whole building survives as a hill however wide the window. A Cut lays a net of low points across the site that the terraces cannot hide behind; around 20 m fixes a single building, and a complex of large halls may need the cut and the window raised together. The effect is not monotone — a little more cut can bring a roof back — so watch the map while you adjust, and check that open ground stays brown: on sites with real terrain a cut removes ground too.
  • Bridges and decks. A bridge wide enough to survive the window looks like ground to any morphological filter.
  • Low noise. If the cloud has been denoised into class 7, tick Ignore noise points so the removed points stay out of the minimum surface.
  • Under canopy. On photogrammetry there is no ground to find there; on LiDAR, sparse ground returns under dense cover may need a slightly larger threshold.

After classification

The output is an ordinary LAS or LAZ with ground in class 2, ready for anything that reads classified point clouds. To turn it into a terrain model, open it in LAS to DEM and build a DTM from the ground class; to look at it in 3D, colour it by class in the viewer.

Frequently asked questions

Is this the same as PDAL's filters.smrf?
Yes. It is a line-by-line port of PDAL 2.10's SMRF filter, including the parts that decide ties — such as which eight neighbouring cells fill an empty one — so the output is not merely similar but identical. It has been checked against native PDAL on airborne LiDAR and on drone photogrammetry, with default and non-default settings, and on every run every point received the same class. The parameter names and defaults are PDAL's too, so settings carry across in either direction.
Which classes does it write?
Class 2 for ground and class 1 for every other point it filters. Points it does not filter — return types you left unticked, and noise points if you chose to ignore them — keep whatever class they had. Tick 'Only mark ground' to leave non-ground points' existing classes alone as well, so that only class 2 is added.
Does it work on photogrammetry clouds?
Yes. A cloud from Metashape, RealityCapture, Pix4D or ODM has exactly one return per point, so every point counts as an 'only' return and all of them are filtered. Files whose return fields are all zero are filtered whole too. What photogrammetry cannot give it is ground under dense canopy — the cameras never saw it — so those areas come out as non-ground, and the terrain beneath them has to be interpolated by whatever uses the classification next.
What cell size and window should I use?
Start with the defaults: a 1 m cell and a window of 18 m. The window has to be wider than half the largest building, or that roof survives the filter and is called ground — raise it on sites with big warehouses or halls. The cell should be no finer than the point spacing of the ground you expect to see. For very large buildings on hilly ground, the cut option adds a coarse net of low points that helps the filter remove them without widening the window everywhere.
How large a file can it handle?
The number of points is not the limit — they are read in passes and never held in memory, so a 50 million point cloud runs in seconds of filtering plus however long it takes to read the file — once to preview, and once more to write. The limit is the grid: up to 8 million cells, which is 8 km² at a 1 m cell. A larger site needs a coarser cell, and the tool says which one when it is needed.
Should I choose LAS or LAZ for the output?
LAZ unless something downstream cannot read it. It is lossless — every point, the header and the coordinate reference system are identical either way — and several times smaller, which makes a large download far more likely to complete. Labelled points go straight into the compressor, so it costs no extra pass.

Related tools

Learn more