riegl

Driver for riegl rxp files. Note that the requires access to Riegl’s ‘rivlib’ and ‘riwavelib’ closed source libraries that can be obtained from Riegl.

To build Riegl support the $RIVLIB_ROOT and $RIWAVELIB_ROOT environment variables must be set before running setup.py.

These variables must point into the directories that rivlib and riwavelib created when they were unzipped.

At runtime, $RIWAVELIB_ROOT/lib must be added to your LD_LIBRARY_PATH (Unix) or PATH (Windows) environment variable so the linked library can be found.

If you wish the waveforms to be processed then they must be extracted from the .rxp file into a .wfm file using the ‘rxp2wfm’ utility (supplied with the riwavelib). Best results are when the -i option (to build an index) is passed. Ensure that the output .wfm file has the same path as the input .rxp file but different extension so that pylidar can find it. Here is an example of running rxp2wfm:

$ rxp2wfm -i –uri data.rxp –out data.wfm

Driver Options

These are contained in the SUPPORTEDOPTIONS module level variable.

Name Use
ROTATION_MATRIX a 4x4 float32 array containing the rotation to be applied to the data. Can be obtained from RieglFileInfo.
MAGNETIC_DECLINATION number of degrees
class pylidar.lidarformats.riegl.RieglFile(fname, mode, controls, userClass)[source]

Driver for reading Riegl rxp files. Uses rivlib via the _riegl module.

close()[source]
static getDriverName()[source]
getHeader()[source]

Riegl doesn’t seem to have a header as such but we can fake it by providing the info from _riegl.getFileInfo

static getHeaderTranslationDict()[source]

Nothing yet - empty dict

getHeaderValue(name)[source]

Just extract the one value and return it

getTotalNumberPulses()[source]

We can assume that is there were waveforms present then the number of waveforms is equal to the number of pulses. Otherwise, no idea how to find out how many pulses so unsupported

static getTranslationDict(arrayType)[source]

Translation dictionary between formats

hasSpatialIndex()[source]

Riegl files aren’t spatially indexed

readPointsByPulse(colNames=None)[source]

Read a 2d structured masked array containing the points for each pulse.

readPointsForRange(colNames=None)[source]

Reads the points for the current range. Returns a 1d array.

Returns an empty array if range is outside of the current file.

colNames can be a list of column names to return. By default all columns are returned.

readPulsesForRange(colNames=None)[source]

Reads the pulses for the current range. Returns a 1d array.

Returns an empty array if range is outside of the current file.

colNames can be a list of column names to return. By default all columns are returned.

readReceived()[source]

Read the received waveform for all pulses returns a 3d masked array First axis is the waveform bin. Second axis is waveform number and last is pulse.

readTransmitted()[source]

Riegl (AFAIK) doesn’t support transmitted

readWaveformInfo()[source]

3d structured masked array containing information about the waveforms.

readWaveforms()[source]

Internal method. Returns both the waveform info and the received formatted in the appropriate way.

setPulseRange(pulseRange)[source]

Sets the PulseRange object to use for non spatial reads/writes.

writeData(pulses=None, points=None, transmitted=None, received=None, waveformInfo=None)[source]

This driver does not support writing so ignore if reading, throw and error otherwise.

class pylidar.lidarformats.riegl.RieglFileInfo(fname)[source]

Class that gets information about a Riegl file and makes it available as fields. The underlying C++ _riegl module does the hard work here

static getDriverName()[source]
static getHeaderTranslationDict()[source]

Nothing yet - empty dict

pylidar.lidarformats.riegl.isRieglFile(fname)[source]

Helper function that looks at the start of the file to determine if it is a riegl file or not