#include <PointSource.h>
Public Types | |
typedef lt_int64 | count_type |
Public Member Functions | |
virtual const PointInfo & | getPointInfo (void) const =0 |
Get the point information. | |
size_t | getNumChannels (void) const |
Get the number of channels. | |
bool | hasChannel (const char *name) const |
Determine if there is a channel with a given name. | |
const ChannelInfo & | getChannel (size_t idx) const |
Access the channel info. | |
const ChannelInfo * | getChannel (const char *name) const |
Access the channel data. | |
virtual count_type | getNumPoints (void) const =0 |
Get the number of points. | |
virtual const char * | getWKT (void) const =0 |
Get the spatial reference system. | |
virtual void | loadMetadata (Metadata &metadata, bool sanitize) const =0 |
Load the point clouds metadata. | |
virtual const Bounds & | getBounds (void) const =0 |
Get the bounding box. | |
virtual const double * | getScale (void) const =0 |
Get the quantization scale. | |
virtual const double * | getOffset (void) const =0 |
Get the quantization offset. | |
virtual size_t | getNumClassIdNames (void) const =0 |
Get the number of classification names. | |
virtual char const *const * | getClassIdNames (void) const =0 |
Get the classification names. | |
virtual double | getTotalWork (const Bounds &bounds, double fraction) const =0 |
Get the amount of work needed to decode bounds. | |
virtual PointIterator * | createIterator (const Bounds &bounds, double fraction, const PointInfo &pointInfo, ProgressDelegate *delegate) const =0 |
Get a PointIterator for a given bounds. | |
size_t | read (const Bounds &bounds, PointData &points, ProgressDelegate *delegate) const |
Fill the point buffer with the best sample of the point cloud in bounds. |
See examples/src/UserTutorial.cpp for examples of accessing the point cloud.
Definition at line 40 of file PointSource.h.
typedef lt_int64 PointSource::count_type |
Definition at line 44 of file PointSource.h.
virtual const PointInfo& PointSource::getPointInfo | ( | void | ) | const [pure virtual] |
This method returns a PointInfo object.
Implemented in PointReader.
size_t PointSource::getNumChannels | ( | void | ) | const |
This method returns the channels. This method is equivalent to calling getPointInfo().getNumChannels().
bool PointSource::hasChannel | ( | const char * | name | ) | const |
The method determines if this source has a channel with the given name.
name | the channel name |
const ChannelInfo& PointSource::getChannel | ( | size_t | idx | ) | const |
This method returns the ChannelInfo for a given index.
idx | the index of the wanted channel |
const ChannelInfo* PointSource::getChannel | ( | const char * | name | ) | const |
This method returns the ChannelInfo for a given name.
name | the name of the wanted channel |
virtual count_type PointSource::getNumPoints | ( | void | ) | const [pure virtual] |
This method returns the number of points in the point cloud.
Implemented in PointReader.
virtual const char* PointSource::getWKT | ( | void | ) | const [pure virtual] |
This method returns the spatial reference system as a Well Known Text (WKT) string. If the PointSource does not have a spatial reference system it will return NULL.
Implemented in PointReader.
virtual void PointSource::loadMetadata | ( | Metadata & | metadata, | |
bool | sanitize | |||
) | const [pure virtual] |
This method loads the metadata for the point cloud. PointSource only load metadata on demand to reduce memory usage.
metadata | The metadata object to fill. | |
sanitize | If true remove vendor-specific metadata that we don't understand for example, Merrick::102 ("Index to page of point records") |
Implemented in MG4PointReader, and TXTPointReader.
virtual const Bounds& PointSource::getBounds | ( | void | ) | const [pure virtual] |
This method returns the geo bounding box of the point cloud.
Implemented in PointReader.
virtual const double* PointSource::getScale | ( | void | ) | const [pure virtual] |
This method returns the quantization scale factors for X, Y, and Z channels. It returns NULL then the point cloud is not quantized or quantization is unknown.
Implemented in PointReader.
virtual const double* PointSource::getOffset | ( | void | ) | const [pure virtual] |
This method returns the quantization offset for X, Y, and Z channels. It returns NULL then the point cloud is not quantized or quantization is unknown.
Implemented in PointReader.
virtual size_t PointSource::getNumClassIdNames | ( | void | ) | const [pure virtual] |
This methods returns the number of classification names.
Implemented in MG4PointReader, and PointReader.
virtual char const* const* PointSource::getClassIdNames | ( | void | ) | const [pure virtual] |
This methods returns an array of classification names with length getNumClassIdNames().
Implemented in MG4PointReader, and PointReader.
virtual double PointSource::getTotalWork | ( | const Bounds & | bounds, | |
double | fraction | |||
) | const [pure virtual] |
This method returns the amount of work needed to decode the points in bounds. getTotalWork() is used with ProgressDelegate to track the progress of a decode or encode.
bounds | the region of interest | |
fraction | the fraction of the points you want (use 1.0 for all the points and use 0.1 to keep every tenth point) |
Implemented in MG4PointReader, PointReader, and TXTPointReader.
virtual PointIterator* PointSource::createIterator | ( | const Bounds & | bounds, | |
double | fraction, | |||
const PointInfo & | pointInfo, | |||
ProgressDelegate * | delegate | |||
) | const [pure virtual] |
This methods returns a PointIterator for the given bounds.
bounds | the region of interest (HUGE_VAL are handled) | |
fraction | the fraction of the points you want (use 1.0 for all the points and use 0.1 to keep every tenth point) | |
channelInfo | the list of channels to be extracted | |
numChannels | the number of channels to be extracted | |
delegate | a ProgressDelegate for feedback (can be NULL) |
Implemented in MG4PointReader, and TXTPointReader.
size_t PointSource::read | ( | const Bounds & | bounds, | |
PointData & | points, | |||
ProgressDelegate * | delegate | |||
) | const |
bounds | the region of interest | |
points | the destination point buffer | |
delegate | a ProgressDelegate for feedback (can be NULL) |
LizardTech |