Riegl RDB Format Definition

OPALS supports reading and writing of Riegl DataBase (RDB) files (file extension is typically ".rdbx") with full attribute support using OPALS Format Definition (OFD) files. Conceptually RDB files are similar to ODM files since they can store arbitrary attributes and contain a spatial index based on primary coordinates. Whereas ODMs are limited to one arbitrary coordinate system, RDB supports multiple specific coordinate systems at the same time (although the spatial index is always based on to the primary coordinates).

Since RDB files are managed in a tangential cartesian coordinate system (Riegl call them project/application coordinate system), RDB files contain a 4x4 pose transformation matrix that allows direct conversion into ECEF (earth-centered, earth-fixed) coordinates. Furthermore, RDB files typically contain sensor coordinates as well, which is why, they can be used as direct input for Module StripAdjust as well.

RDB coordinate systems

The knowledge of those different coordinate system is relevant, because the user can control which coordinates should be imported or exported:

  • proj: project/application coordinate system (default)
  • ecef: earth centered earth fixed coordinate system (requirement pose transformation matrix exists)
  • scs: sensor coordinate system (import only if available in the RDB file)
  • map: map projection coordinates (import only if available in the RDB file)

From an OPALS point of view, points can be imported in proj, ecef and scs coordinate system. Furthermore, map coordinates can also be read if if stored in the RDB file. When exporting OPALS point clouds to RDB only two coordinate systems are reasonable: proj and ecef. If the OPALS point coordinates are given in ecef one must also specify the pose transformation matrix, allowing an implicit conversion to proj during export.

Attributes within RDB files

When importing RDB files relevant attributes are read which should suit most applications. Nevertheless, using a corresponding OFD file more, less or non attributes can be defined for import (or export), similar as in the las/laz format. Note that attributes in RDB are not stored using a specific data type, but as integer values of different size. Floating-point values are converter to integer value based on the given scale, minValue and maxValue (for more details refer to Riegl rdblib documentation). This is why appropriate values for the aforementioned parameters are essential for storing attributes in RDB. When exporting RDB files those parameters can by either defined within the OFD file, or they are derived from the ODM statistic by Module Export. In other modules (e.g. Module Translate) the input attribute statistics might not be available. In this situation the definition of scale, minValue and maxValue is mandatory.

OFD XML-attributes for describing RDB attributes
attributerelevancedescriptiondefault
rdbName I/E the rdb attribute name name
rdbTitle E the rdb attribute title <empty>
rdbDescription E textual description of the rdb attribute <empty>
name I/E the OPALS attribute's name
type I OPALS data type to be used for a user-defined attribute
unit E The physical rdb unit symbol, like "m", "rad", "K", etc. <empty>
scale E the scale/resolution to select the appropriate rdb storage size <see text>
minValue E the theoretical minimum value to select the appropriate rdb storage size <see text>
maxValue E the theoretical maximum value to select the appropriate rdb storage size <see text>
defaultValue E the default value (minimum <= default <= maximum) <see text>
invalidValue E the invalid value (minimum <= invalid <= maximum, use "not-a-number" if there is no invalid value) <see text>

To identify invalid attribute values (=nodata) RDB uses an invalidValue similar as the nodata value for raster file. This optional number must also lie within the defined minValue and maxValue. In case no invalid value should be used, set invalidValue to nan (not-a-number).

For completeness it is mentioned that min, max and scale parameters have to be set for coordinates as well. But there only one parameter set is used for all coordinate axes. Hence, x, y and z of all points needs to fit between min and max. As for the attributes, the OPALS modules use the coordinate bounding box of input data to set appropriate parameters. If not available the definition within the OFD file is mandatory.

Example

The follow example imports an rdbx file with defined attributes and sensor coordinates into an ODM. Then, the ODM is exported back into an rdbx file filtering low amplitude echos (lower than -35db) to eliminate most outliers. The use OFD file can be found in the demo directory and is listed below:

<opalsFormatDefinition>
<description>RDB format definition with standard attributes and sensor coordinates</description>
<rdb coordinateSystem="proj">
<attribute name='_BeamVectorSCSX' rdbName='riegl.xyz_socs[0]' type='float' />
<attribute name='_BeamVectorSCSY' rdbName='riegl.xyz_socs[1]' type='float' />
<attribute name='_BeamVectorSCSZ' rdbName='riegl.xyz_socs[2]' type='float' />
<attribute name='GPSTime' rdbName='riegl.timestamp' />
<attribute name='Amplitude' rdbName='riegl.amplitude' />
<attribute name='_amplitude_db' rdbName='riegl.reflectance' type='float' />
<attribute name='_deviation' rdbName='riegl.deviation' type='float' />
<attribute name='NrOfEchos' rdbName='riegl.target_count' />
<attribute name='EchoNumber' rdbName='riegl.target_index' />
<attribute name='ScanAngle' rdbName='riegl.scan_angle' />
</rdb>
</opalsFormatDefinition>
opalsImport -inf 211125_112749_1.rdbx -iformat rdb_with_scs.xml
opalsExport -inf 211125_112749_1.odm -outf test.rdbx -oformat rdb_with_scs.xml -filter "generic[_amplitude_db>-35]"

Figure 1 shows different 3d views of the demo data set. As visible on the left the raw point cloud contains a significant amount of noisy echoes. Coloring the point cloud by amplitude values, reveals a low amplitude for most outliers. Applying an appropriate amplitude filter (see above) a cleaned point cloud can be achieved, as shown on the right.

Fig. 1: Raw point cloud height colored (left) and colored by amplitude (center) and amplitude filtered point cloud (right)
Author
jo, gm
opalsImport is the executable file of Module Import
Definition: ModuleExecutables.hpp:113
opalsExport is the executable file of Module Export
Definition: ModuleExecutables.hpp:73
@ filter
string to be parsed in construction of DM::IFilter (various modules)