3D Forest
Software for analysis of Lidar data from forest environment.
LasFile Class Reference

#include <LasFile.hpp>

Classes

class  Format
 
struct  Header
 
struct  Point
 

Public Types

enum  Classification {
  CLASS_NEVER_CLASSIFIED , CLASS_UNASSIGNED , CLASS_GROUND , CLASS_LOW_VEGETATION ,
  CLASS_MEDIUM_VEGETATION , CLASS_HIGH_VEGETATION , CLASS_BUILDING
}
 

Public Member Functions

 LasFile ()
 
 ~LasFile ()
 
void open (const std::string &path)
 
void create (const std::string &path)
 
void close ()
 
void seek (uint64_t offset)
 
void seekHeader ()
 
void seekVlr ()
 
void seekPointData ()
 
void seekExtendedVlr ()
 
void readHeader ()
 
void writeHeader ()
 
void readPoint (Point &pt)
 
void readPoint (Point &pt, const uint8_t *buffer, uint8_t fmt) const
 
void writePoint (const Point &pt)
 
void writePoint (uint8_t *buffer, const Point &pt) const
 
void transform (double &x, double &y, double &z, const Point &pt) const
 
void transform (double &x, double &y, double &z, const uint8_t *buffer) const
 
void transformInvert (double &x, double &y, double &z) const
 
Filefile ()
 

Static Public Member Functions

static void create (const std::string &path, const std::vector< LasFile::Point > &points, const std::array< double, 3 > scale={1, 1, 1}, const std::array< double, 3 > offset={0, 0, 0}, uint8_t version_minor=4)
 

Public Attributes

Header header
 

Static Public Attributes

static const uint32_t FORMAT_INVALID = 0
 
static const uint32_t FORMAT_XYZ = 1U << 1
 
static const uint32_t FORMAT_INTENSITY = 1U << 2
 
static const uint32_t FORMAT_CLASSIFICATION = 1U << 3
 
static const uint32_t FORMAT_RGB = 1U << 4
 
static const uint32_t FORMAT_LAYER = 1U << 5
 

Protected Member Functions

void readHeader (Header &hdr)
 
void writeHeader (const Header &hdr)
 
void readPoint (uint8_t *buffer)
 

Protected Attributes

File file_
 

Member Enumeration Documentation

◆ Classification

LAS Classification.

Enumerator
CLASS_NEVER_CLASSIFIED 
CLASS_UNASSIGNED 
CLASS_GROUND 
CLASS_LOW_VEGETATION 
CLASS_MEDIUM_VEGETATION 
CLASS_HIGH_VEGETATION 
CLASS_BUILDING 

Constructor & Destructor Documentation

◆ LasFile()

LasFile::LasFile ( )

◆ ~LasFile()

LasFile::~LasFile ( )

Member Function Documentation

◆ close()

◆ create() [1/2]

void LasFile::create ( const std::string &  path)

◆ create() [2/2]

void LasFile::create ( const std::string &  path,
const std::vector< LasFile::Point > &  points,
const std::array< double, 3 >  scale = {1, 1, 1},
const std::array< double, 3 >  offset = {0, 0, 0},
uint8_t  version_minor = 4 
)
static

◆ file()

◆ open()

void LasFile::open ( const std::string &  path)

◆ readHeader() [1/2]

◆ readHeader() [2/2]

void LasFile::readHeader ( Header hdr)
protected

◆ readPoint() [1/3]

void LasFile::readPoint ( Point pt)

Referenced by PageData::read(), and readPoint().

◆ readPoint() [2/3]

void LasFile::readPoint ( Point pt,
const uint8_t *  buffer,
uint8_t  fmt 
) const

◆ readPoint() [3/3]

void LasFile::readPoint ( uint8_t *  buffer)
protected

◆ seek()

◆ seekExtendedVlr()

void LasFile::seekExtendedVlr ( )

◆ seekHeader()

void LasFile::seekHeader ( )

◆ seekPointData()

void LasFile::seekPointData ( )

◆ seekVlr()

void LasFile::seekVlr ( )

◆ transform() [1/2]

void LasFile::transform ( double &  x,
double &  y,
double &  z,
const Point pt 
) const

◆ transform() [2/2]

void LasFile::transform ( double &  x,
double &  y,
double &  z,
const uint8_t *  buffer 
) const

◆ transformInvert()

void LasFile::transformInvert ( double &  x,
double &  y,
double &  z 
) const

◆ writeHeader() [1/2]

void LasFile::writeHeader ( )

◆ writeHeader() [2/2]

void LasFile::writeHeader ( const Header hdr)
protected

◆ writePoint() [1/2]

void LasFile::writePoint ( const Point pt)

◆ writePoint() [2/2]

void LasFile::writePoint ( uint8_t *  buffer,
const Point pt 
) const

Member Data Documentation

◆ file_

◆ FORMAT_CLASSIFICATION

const uint32_t LasFile::FORMAT_CLASSIFICATION = 1U << 3
static

◆ FORMAT_INTENSITY

const uint32_t LasFile::FORMAT_INTENSITY = 1U << 2
static

◆ FORMAT_INVALID

const uint32_t LasFile::FORMAT_INVALID = 0
static

LAS Attribute.

Referenced by ExportFileProperties::clear().

◆ FORMAT_LAYER

const uint32_t LasFile::FORMAT_LAYER = 1U << 5
static

◆ FORMAT_RGB

const uint32_t LasFile::FORMAT_RGB = 1U << 4
static

◆ FORMAT_XYZ

const uint32_t LasFile::FORMAT_XYZ = 1U << 1
static

◆ header


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