The PointSource class is the root class for accessing LiDAR data. Following is a description of each of the methods.
To access the number of points, call PointSource::getNumPoints().
A channel is all the values for a given attribute. For example, the X channel is all the X values for a given point cloud.
To access the channel information, call PointSource::getNumChannels() and PointSource::getPointInfo().
For more information about channels, see "The ChannelInfo Class" and "The PointInfo Class".
If you call the functions PointSource::getScale() and PointSource::getOffset()and NULL is returned, the file is not quantized. Otherwise it returns an array of doubles representing the quantization scale and offset values for the X, Y and Z channels.
Even when the LiDAR file is quantized the X, Y, Z value that are extracted form the point cloud are floating point values, not the integer indexes.
For more information about quantization, see "Floating Point Quantization".
Metadata is auxiliary information about the point cloud stored as key-value pairs. Metadata can be any information the user wishes to add. You can store strings, arrays of floating point values and raw binary data.
To access the channel information, call PointSource::loadMetadata().
For more information see "The Metadata Class".
The MrSID Decode SDK stores the classification name as an array of strings. You can use the ClassId channel to index into the ClassIdName array.
To access the classification names, call PointSource::getNumClassIdNames() and PointSource::getClassIdNames().
A point iterator is an iterator that gets points for a given bounds.
The function PointSource::createIterator() returns an iterator for a given bounds, fraction and set of channels (see "Specifying a Region of Interest").
To extract the points, call the function PointIterator::getNextPoints(), which walks the specified region of the point cloud until there are no more points to extract (for an example, see "Code Examples").
For more information see "The PointInterator Class".
Using bounds and a fixed number of points to extract is much simpler but less versatile.
PointSource::read() fills a PointData object with the points that most uniformly represent the specified region of interest (for an example, see "Code Examples").