libLAS API Reference  1.8.1
Public Types | Public Member Functions | List of all members
liblas::Point Class Reference

Point data record composed with X, Y, Z coordinates and attributes. More...

#include <point.hpp>

Collaboration diagram for liblas::Point:
Collaboration graph

Public Types

enum  DataMemberFlag {
  eReturnNumber = 1, eNumberOfReturns = 2, eScanDirection = 4, eFlightLineEdge = 8,
  eClassification = 16, eScanAngleRank = 32, eTime = 64
}
 
enum  ClassificationType {
  eCreated = 0, eUnclassified, eGround, eLowVegetation,
  eMediumVegetation, eHighVegetation, eBuilding, eLowPoint,
  eModelKeyPoint, eWater = 9, eOverlapPoints = 12
}
 
enum  ScanAngleRankRange { eScanAngleRankMin = -90, eScanAngleRankMax = 90 }
 

Public Member Functions

 ~Point ()
 
 Point (Header const *header)
 
 Point (Point const &other)
 
Pointoperator= (Point const &rhs)
 
double GetX () const
 
double GetY () const
 
double GetZ () const
 
int32_t GetRawX () const
 
int32_t GetRawY () const
 
int32_t GetRawZ () const
 
void SetCoordinates (double const &x, double const &y, double const &z)
 
void SetX (double const &value)
 
void SetY (double const &value)
 
void SetZ (double const &value)
 
void SetRawX (int32_t const &value)
 
void SetRawY (int32_t const &value)
 
void SetRawZ (int32_t const &value)
 
uint16_t GetIntensity () const
 
void SetIntensity (uint16_t const &intensity)
 
uint8_t GetScanFlags () const
 Gets all scanning flags encoded as single byte. More...
 
void SetScanFlags (uint8_t const &flags)
 Sets all scanning flags passed as a single byte. More...
 
uint16_t GetReturnNumber () const
 
void SetReturnNumber (uint16_t const &num)
 
uint16_t GetNumberOfReturns () const
 
void SetNumberOfReturns (uint16_t const &num)
 
uint16_t GetScanDirection () const
 
void SetScanDirection (uint16_t const &dir)
 
uint16_t GetFlightLineEdge () const
 
void SetFlightLineEdge (uint16_t const &edge)
 
Classification GetClassification () const
 
void SetClassification (Classification const &cls)
 
void SetClassification (Classification::bitset_type const &flags)
 
void SetClassification (uint8_t const &flags)
 
int8_t GetScanAngleRank () const
 
void SetScanAngleRank (int8_t const &rank)
 
uint8_t GetUserData () const
 Fetch value of File Marker (LAS 1.0) or User Data (LAS 1.1). More...
 
void SetUserData (uint8_t const &data)
 Set value of File Marker (LAS 1.0) or User Data (LAS 1.1). More...
 
uint16_t GetPointSourceID () const
 Fetch value of User Bit Field (LAS 1.0) or Point Source ID (LAS 1.1). More...
 
void SetPointSourceID (uint16_t const &id)
 Set value of User Bit Field (LAS 1.0) or Point Source ID (LAS 1.1). More...
 
Color GetColor () const
 Fetch color value associated with this point (LAS 1.2) More...
 
void SetColor (Color const &value)
 Set color value associated with this point (LAS 1.2) More...
 
double GetTime () const
 
void SetTime (double const &time)
 
double operator[] (std::size_t const &index) const
 Const version of index operator providing access to XYZ coordinates of point record. More...
 
bool equal (Point const &other) const
 
bool Validate () const
 
bool IsValid () const
 
std::vector< uint8_t > const & GetData () const
 
std::vector< uint8_t > & GetData ()
 
void SetData (std::vector< uint8_t > const &v)
 
void SetHeader (Header const *header)
 
Header const * GetHeader () const
 
property_tree::ptree GetPTree () const
 
boost::any GetValue (Dimension const &d) const
 

Detailed Description

Point data record composed with X, Y, Z coordinates and attributes.

Member Enumeration Documentation

Enumerator
eCreated 
eUnclassified 
eGround 
eLowVegetation 
eMediumVegetation 
eHighVegetation 
eBuilding 
eLowPoint 
eModelKeyPoint 
eWater 
eOverlapPoints 
Enumerator
eReturnNumber 
eNumberOfReturns 
eScanDirection 
eFlightLineEdge 
eClassification 
eScanAngleRank 
eTime 
Enumerator
eScanAngleRankMin 
eScanAngleRankMax 

Constructor & Destructor Documentation

liblas::Point::~Point ( )
inline
liblas::Point::Point ( Header const *  header)
liblas::Point::Point ( Point const &  other)

Member Function Documentation

bool liblas::Point::equal ( Point const &  other) const
Todo:
TODO: Should we compare other data members, but not only coordinates?

Referenced by liblas::operator==().

Classification liblas::Point::GetClassification ( ) const
Color liblas::Point::GetColor ( ) const

Fetch color value associated with this point (LAS 1.2)

std::vector<uint8_t> const& liblas::Point::GetData ( ) const
inline
std::vector<uint8_t>& liblas::Point::GetData ( )
inline
uint16_t liblas::Point::GetFlightLineEdge ( ) const
Header const* liblas::Point::GetHeader ( ) const
uint16_t liblas::Point::GetIntensity ( ) const
uint16_t liblas::Point::GetNumberOfReturns ( ) const
uint16_t liblas::Point::GetPointSourceID ( ) const

Fetch value of User Bit Field (LAS 1.0) or Point Source ID (LAS 1.1).

property_tree::ptree liblas::Point::GetPTree ( ) const
int32_t liblas::Point::GetRawX ( ) const
int32_t liblas::Point::GetRawY ( ) const
int32_t liblas::Point::GetRawZ ( ) const
uint16_t liblas::Point::GetReturnNumber ( ) const
int8_t liblas::Point::GetScanAngleRank ( ) const
uint16_t liblas::Point::GetScanDirection ( ) const
uint8_t liblas::Point::GetScanFlags ( ) const

Gets all scanning flags encoded as single byte.

The flags are (mandatory):

  • Return Number (bits 0, 1, 2);
  • Number of Returns - given pulse (bits 3, 4, 5);
  • Scan Direction Flag (bit 6);
  • Edge of Flight Line (bit 7).
double liblas::Point::GetTime ( ) const
uint8_t liblas::Point::GetUserData ( ) const

Fetch value of File Marker (LAS 1.0) or User Data (LAS 1.1).

boost::any liblas::Point::GetValue ( Dimension const &  d) const
double liblas::Point::GetX ( ) const
double liblas::Point::GetY ( ) const
double liblas::Point::GetZ ( ) const
bool liblas::Point::IsValid ( ) const
Point& liblas::Point::operator= ( Point const &  rhs)
double liblas::Point::operator[] ( std::size_t const &  index) const
inline

Const version of index operator providing access to XYZ coordinates of point record.

Valid index values are 0, 1 or 2.

Exceptions
std::out_of_rangeif requested index is out of range (> 2).

References LAS_DLL, and liblas::operator<<().

void liblas::Point::SetClassification ( Classification const &  cls)
void liblas::Point::SetClassification ( Classification::bitset_type const &  flags)
void liblas::Point::SetClassification ( uint8_t const &  flags)
void liblas::Point::SetColor ( Color const &  value)

Set color value associated with this point (LAS 1.2)

void liblas::Point::SetCoordinates ( double const &  x,
double const &  y,
double const &  z 
)
void liblas::Point::SetData ( std::vector< uint8_t > const &  v)
inline
void liblas::Point::SetFlightLineEdge ( uint16_t const &  edge)
void liblas::Point::SetHeader ( Header const *  header)
void liblas::Point::SetIntensity ( uint16_t const &  intensity)
void liblas::Point::SetNumberOfReturns ( uint16_t const &  num)
void liblas::Point::SetPointSourceID ( uint16_t const &  id)

Set value of User Bit Field (LAS 1.0) or Point Source ID (LAS 1.1).

void liblas::Point::SetRawX ( int32_t const &  value)
void liblas::Point::SetRawY ( int32_t const &  value)
void liblas::Point::SetRawZ ( int32_t const &  value)
void liblas::Point::SetReturnNumber ( uint16_t const &  num)
void liblas::Point::SetScanAngleRank ( int8_t const &  rank)
void liblas::Point::SetScanDirection ( uint16_t const &  dir)
void liblas::Point::SetScanFlags ( uint8_t const &  flags)

Sets all scanning flags passed as a single byte.

See also
Documentation of GetScanFlags method for flags details.
void liblas::Point::SetTime ( double const &  time)
void liblas::Point::SetUserData ( uint8_t const &  data)

Set value of File Marker (LAS 1.0) or User Data (LAS 1.1).

void liblas::Point::SetX ( double const &  value)
void liblas::Point::SetY ( double const &  value)
void liblas::Point::SetZ ( double const &  value)
bool liblas::Point::Validate ( ) const

The documentation for this class was generated from the following file: