42#ifndef LIBLAS_LASCLASSIFICATION_HPP_INCLUDED
43#define LIBLAS_LASCLASSIFICATION_HPP_INCLUDED
127 m_flags = other.m_flags;
135 m_flags = rhs.m_flags;
215 return (other.m_flags == m_flags);
222 void check_class_index(uint32_t
index)
const;
228 return lhs.
equal(rhs);
234 return (!(lhs == rhs));
250 return (os << flags);
Class definition to manipulate properties of point record classification.
Definition classification.hpp:67
std::bitset< 8 > bitset_type
Alias on std::bitset<8> used as collection of flags.
Definition classification.hpp:71
uint8_t GetClass() const
Returns index of ASPRS classification as defined in the lookup table.
void SetSynthetic(bool flag)
Sets if this point was created by a technique other than LIDAR collection such as digitized from a ph...
Definition classification.hpp:174
void SetWithheld(bool flag)
SetTests if this point should excluded from processing.
Definition classification.hpp:199
bitset_type GetFlags() const
Named accessor converting Classification to std::bitset<8>.
Definition classification.hpp:148
bool IsWithheld() const
Tests if this point should excluded from processing.
Definition classification.hpp:205
Classification(bitset_type const &flags)
Initializes classification flags using given set of 8 bits.
Definition classification.hpp:98
Classification()
Default initialization constructor.
Definition classification.hpp:94
bool IsSynthetic() const
Tests if this point was created by a technique other than LIDAR collection.
Definition classification.hpp:180
void SetKeyPoint(bool flag)
Sets if this point is considered to be a model keypoint and thus generally should not be withheld in ...
Definition classification.hpp:187
bool IsKeyPoint() const
Tests if this point is considered to be a model keypoint.
Definition classification.hpp:193
Classification & operator=(Classification const &rhs)
Assignment operator.
Definition classification.hpp:131
bool equal(Classification const &other) const
Compares this classification object with other one.
Definition classification.hpp:213
void SetClass(uint32_t index)
Updates index of ASPRS classification as defined in the lookup table.
BitPosition
Values of indexes in the set of bit flags.
Definition classification.hpp:84
@ eSyntheticBit
Synthetic flag.
Definition classification.hpp:86
@ eKeyPointBit
Key-point flag.
Definition classification.hpp:87
@ eClassBit
First bit position of 0:4 range.
Definition classification.hpp:85
@ eWithheldBit
Withheld flag.
Definition classification.hpp:88
Classification(uint32_t cls, bool s, bool k, bool w)
Initializes classification with values of given compounds.
Definition classification.hpp:116
Classification(uint8_t const &flags)
Initializes classification flags using 8 bits of integral type.
Definition classification.hpp:104
static uint32_t const class_table_size
Number of classes in lookup table as defined in ASPRS LAS 1.1+.
Definition classification.hpp:80
std::string GetClassName() const
Raturns name of class as defined in LAS 1.1+ Finds class name in lookup table based on class index as...
Classification(Classification const &other)
Copy constructor.
Definition classification.hpp:125
#define LAS_DLL
Definition export.hpp:58
Namespace grouping all elements of libLAS public interface.
Definition bounds.hpp:60
bool operator!=(Classification const &lhs, Classification const &rhs)
Not-equal-to operator implemented in terms of Classification::equal.
Definition classification.hpp:232
std::ostream & operator<<(std::ostream &os, Classification const &cls)
The output stream operator is based on std::bitset<N>::operator<<.
Definition classification.hpp:247
bool operator==(Classification const &lhs, Classification const &rhs)
Equal-to operator implemented in terms of Classification::equal.
Definition classification.hpp:226