This page contains a collection of useful OPALS command sequences. If you want your own cases published here, please send us an e-mail with the commands, a short description of the processing chain and optionally illustrative figures.
To import point cloud data in the OPALS Data Manager (ODM), use the opalsImport module.
To import all files of a directory into a single ODM, use wildcard characters (*,?) during import (first case), while if only specific files need to be selected, use the quotes (second case).
To compute and store the laser beam information, import the point cloud into an ODM by providing the trajectory file as well and use the storeBeamInfo parameter. For computing BeamVectorSCS and ScanAngle it is necessary to specify a coordinate reference system using coord_ref_sys.
To derive a hill shading, first import the point cloud into an ODM, interpolate an elevation grid model and then compute the shaded relief raster map.
To derive a colour coded elevation map, import the point cloud into an ODM, interpolate an elevation grid model and then perform Module ZColor a "z-coloring".
To analyse the height distribution of a point cloud, import the data and compute a histogram of its z attribute (default).
To derive a histogram of a point attribute, import the point cloud into an ODM and compute the histogram of the desired attribute (e.g. the Amplitude of each point).
To analyse the point density of the data set, import the point cloud into an ODM, derive a point density raster model and compute its histogram. To visualize it as map, apply a z-coloring to it.
To compute the height differences of overlapping strips, import both strips (points clouds), interpolate an elevation grid model (DEM) for each one and calculate a difference model of both DEMs. To visualize it, apply a z-coloring to it.
To calculate a DEM based on last echoes only, import the point cloud into an ODM and interpolate an elevation grid model by taking into account only the last echoes using a filter.
To calculate a DTM based on ground points only, import the point cloud into an ODM and then interpolate an elevation grid model by taking into account only the ground points using a filter.
To perform quality control of an entire flight block (point density, DEM, strip differences, strip displacements via LSM, including mosaic calculation), use the Python script opalsQuality.
To get a quick overview of a LiDAR dataset, import the point cloud, derive a simple DEM, and visualize it as a shaded relief and a coloured map.
To query the available attributes of of a LiDAR dataset, import the point cloud into an ODM and log the ODM header.
To compute normal vectors for each point in a point cloud, import the point cloud into an ODM and estimate local surface normal information for each point.
To calibrate a full waveform LiDAR data radiometrically, import the point cloud into an ODM and estimate the normal vector for each point. Then, calculate the calibration constant and derive the calibrated radiometric values for each echo.
To flag outliers in a point cloud, import the point cloud into an ODM and update the Classification (attribute) values according to the desired criterion (e.g. 3D point density).
Since OPALS version 2.3.0 Module FillGaps is provided for specifically solving this task. For completeness, however, a deprecated strategy for deriving a gap-free DEMs is also shown below. Therefore, import the point cloud into an ODM, interpolate DEMs with three different interpolation methods (movingPlanes, movingAverage and nearestNeighbour) and then fill in the gaps by combining these grid models.
To import points within a radius r
from a given location (x1,y1), import the point cloud into an ODM using a generic filter. For export, use the same principle.
To import a dataset in a specified rectangular area of interest, import the point cloud into an ODM using a Region filter.
To create a result (e.g. a grid model) only in a specified rectangular area of interest, import the entire point cloud into an ODM and interpolate an elevation grid model using a user-defined grid limit.
To find points on cables in point cloud data, import the point cloud into an ODM, estimate the normal vector for each point (using a high number of neighbours) and store the corresponding eigenvalues and eigenvectors. Then, add a new attribute _Linearity
to the ODM and classify the points according to its values (Classification value 9: points with high linearity).
To store object heights (i.e. height above DEM), import the point cloud into an ODM, interpolate an elevation grid model (DSM) and then add a new attribute NormalizedZ
to the ODM, which describes the height difference between the point cloud and the DSM.
To export X, Y, Z, Amplitude, EchoWidth from an ODM into a text file, import the point cloud into an ODM including its input format and then export it including the desired output format.
For calculating a land cover dependent DSM, import the point cloud into an ODM and then use the python script forDSM.
The single processing steps of the above example are as follows. After data import and homogenization of the data distribution, two approximate DSMs are derived by rasterization (highest elevation within a cell) and movingPlanes interpolation. The final DSM is a combination of both models depending on the surface roughness (sigma0).
For all modules supporting both neighbours and searchRadius (e.g. opalsNormals, opalsGrid, opalsCell etc.), the primary search criterion is the nearest neighbous count. To enforce fixed distance queries, set the neighbour count significantly higher than the expected point density. For example:
To find tall vegetation (e.g. trees and bushes) in point cloud data, import the point cloud into an ODM and calculate the echo ratio for each point. Then, interpolate an echo ratio grid model, using only the first returns, and create a mask that maintains only the vegetation. Finally, smoothen the result by applying a morphological opening filter to it.
In general it is not recommended to subsample point clouds since it will result in loss of information. OPALS is designed to handle huge point cloud in an efficient way, so that subsampling point cloud is not required in general. However, for data sets with strongly varying point density selecting the optimal processing strategy and threshold can be challenging. In such situations and for exporting the data to other software products, subsampling can be beneficial or sometimes even necessary. OPALS currently provides three different ways of subsampling point clouds:
This simple and fast strategy can reduce the data amount by a certain factor but it cannot compensate for inhomogeneous point density. Using random and serial number generators in filters, every n-th point can be selected. Whereas serial number generator strictly picks every n-th from the input sequence, random number generator can be applied to select every n-th point in a stochastic way which can be beneficial in certain situations. In the following example every 10-th point is selected:
Module Cell is a flexible and powerful tool for subsampling based on 2D cells. Within each cell e.g. the echo with the highest amplitude, the point closest to the center, the lowest points, etc. can be selected and stored within an ODM. The only drawback of this strategy is that the subsampling is done based on 2D cells (it is planned to extend it to 3D cells in future releases). So in complex 3D scenes results might be unsatisfactory, because vertical structures will be underrepresented in the final point cloud. In the following example the closest point to each cell center is selected using a cell size of 1m, which will result in a very homogeneous point cloud.
This method is currently the only option to subsample data based on 3D regions. The strategy selects a single point within 3D spheres with the help of an additional attribute (called _ignore
in this case). If the attribute is set to 1 the point will be ignored and if it is 0 the point is marked for selection/subsampling. First, the attribute is initialised with 1 for all points during import (or use Module AddInfo if you do have an ODM file already). Then, the actual subsampling process is performed using Module AddInfo. If there is no neighbour marked for subsampling yet (number of neighbours is equal to the sum of the _ignore
attribute of all neighbours), the current point is marked for subsampling (_ignore=0
). Otherwise the attribute stays 1 (_ignore=1
). Finally the points that are marked for subsampling are exported (_ignore==0
) and the helper attribute is removed (remove
[_ignore]). In the following example the neighbourhood is defined by a 3D search radius of 1m. The high number of neighbours (1000) secures that all points within the 1m sphere are considered. The resulting point cloud is homogeneous in 3D space but compared to method 2, one doesn't have control which specific point is selected for subsampling.