Use of this function requires a license for Whitebox Workflows for Python Professional (WbW-Pro). Please visit www.whiteboxgeo.com to purchase a license.
This function provides a faster alternative to the lidar_ground_point_filter
algorithm, provided in the free version of Whitebox Workflows, for the extraction of ground points from within a LiDAR point cloud. The algorithm works by placing a grid overtop of the point cloud of a specified resolution (block_size
, in xy-units) and identifying the subset of lidar points associated with the lowest position in each block. A raster surface is then created by TINing these points. The surface is further processed by removing any off-terrain objects (OTOs), including buildings smaller than the max_building_size
parameter (xy-units). Removing OTOs also requires the user to specify the value of a slope_threshold
, in degrees. Finally, the algorithm then extracts all of the points in the input LiDAR point cloud (input
) that are within a specified absolute vertical distance (elev_threshold
) of this surface model.
Conceptually, this method of ground-point filtering is somewhat similar in concept to the cloth-simulation approach of Zhang et al. (2016). The difference is that the cloth is first fitted to the minimum surface with infinite flexibility and then the rigidity of the cloth is subsequently increased, via the identification and removal of OTOs from the minimal surface. The slope_threshold
parameter effectively controls the eventual rigidity of the fitted surface.
By default, the tool will return a point cloud containing only the subset of points in the input dataset that coincide with the idenfitied ground points. Setting the classify
parameter to True modifies this behaviour such that the output point cloud will contain all of the points within the input dataset, but will have the classification value of identified ground points set to '2' (i.e., the ground class value) and all other points will be set to '1' (i.e., the unclassified class value). By setting the preserve_classes
paramter to True, all non-ground points in the output cloud will have the same classes as the corresponding point class values in the input dataset.
Compared with the lidar_ground_point_filter
algorithm, the improved_ground_point_filter
algorithm is generally far faster and is able to more effectively remove points associated with larger buildings. Removing large buildings from point clouds with the lidar_ground_point_filter
algorithm requires use of very large search distances, which slows the operation considerably.
As a comparison of the two available methods, one test tile of LiDAR containing numerous large buildings and abundant vegetation required 600.5 seconds to process on the test system using the lidar_ground_point_filter
algorithm (removing all but the largest buildings) and 9.8 seconds to process using the improved_ground_point_filter
algorithm (with complete building removal), i.e., 61x faster.
The original test LiDAR tile, containing abundant vegetation and buildings:
The result of applying the lidar_ground_point_filter
function, with a search radius of 25 m and max inter-point slope of 15 degrees:
The result of applying the improved_ground_point_filter
method, with block_size
= 1.0 m, max_building_size
= 150.0 m, slope_threshold
= 15.0 degrees, and elev_threshold
= 0.15 m:
Zhang, W., Qi, J., Wan, P., Wang, H., Xie, D., Wang, X., & Yan, G. (2016). An easy-to-use airborne LiDAR data filtering method based on cloth simulation. Remote sensing, 8(6), 501.
def improved_ground_point_filter(self, input: Lidar, block_size = 1.0, max_building_size = 150.0, slope_threshold = 15.0, elev_threshold = 0.15, , classify = False, preserve_classes = False) -> Lidar: ...