REGRID_LAS
Resamples a LiDAR point cloud onto a regular grid by converting the dataset to a raster DEM and then reconstructing a point cloud from that surface.
The workflow computes point density, derives a coverage mask, generates a DEM at the specified resolution, and converts the DEM back into a regularly spaced point cloud. The output represents a gridded surface with uniform point spacing, which is easier to visualize and process than irregular LiDAR data.
Typical use: converting bathymetric (MBES) or terrain LiDAR into a uniform surface representation before visualization or tiling. Especially useful when point density is highly variable across the dataset.
Contract
| Type | REGRID_LAS |
| Accepts | input_las: las |
| Produces | output_las: las |
| Params | resolution (number) |
Inputs
| Slot | Type | Description |
|---|---|---|
input_las | las | Source point cloud dataset |
Outputs
| Slot | Type | Description |
|---|---|---|
output_las | las | Regularly spaced point cloud derived from the reconstructed surface |
Parameters
| Name | Type | Description |
|---|---|---|
resolution | number | Grid cell size used when generating the DEM, in the dataset's spatial units |
What it does internally
1. Compute point density raster
A PDAL pipeline reads the input and produces a density raster (density.tif) counting points per grid cell. Ground-classified points are excluded.
2. Extract coverage footprint
The density raster is processed through a sophisticated coverage detection pipeline:
- Threshold pixels where density > 0
- Polygonize the result (
gdal_polygonize) - Union all polygons (
ST_Union) - Remove small isolated areas below an area threshold
- Smooth polygon edges with a double-buffer (
ST_Buffer(+5)thenST_Buffer(-5)) - Simplify geometry (
ST_SimplifyPreserveTopology)
The result is a clean coverage mask (mask.gpkg) that defines the valid LiDAR footprint.
3. Generate DEM
A PDAL pipeline converts the input point cloud to a raster DEM (dem.tif) at the specified resolution, using mean elevation per cell.
4. Convert DEM back to point cloud
A PDAL pipeline reads the DEM raster and writes it as a LAS point cloud, producing a regularly spaced grid of points at the DEM's cell resolution.
The output point cloud represents the dataset's surface at uniform spacing — irregular point density from the original survey is removed.
Recipe usage
json
{
"id": "regrid",
"type": "REGRID_LAS",
"inputs": { "input_las": "job:input_las" },
"outputs": { "output_las": "step:regrid.output_las" },
"param_keys": ["resolution"]
}Job params:
json
"params": {
"regrid": {
"resolution": 0.5
}
}Artifact storage path
artifacts/job_{id}/regrid/output.lasNotes
The resolution parameter is in the spatial units of the input dataset's CRS. If the dataset is in feet, resolution: 1 means 1-foot cells. Reproject first if a metric resolution is needed.