#include <LasFile.hpp>
Classes | |
struct | AttributesBuffer |
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 () |
bool | open () const |
void | seekPoint (uint64_t index) |
void | readPoint (Point &pt) |
void | writePoint (const Point &pt) |
uint64_t | size () const |
uint64_t | offset () const |
void | seek (uint64_t offset) |
void | seekHeader () |
void | seekVlr () |
void | seekPointData () |
void | seekExtendedVlr () |
void | readHeader () |
void | writeHeader () |
void | readBuffer (uint8_t *buffer, uint64_t nbyte) |
void | writeBuffer (const uint8_t *buffer, uint64_t nbyte) |
void | formatBytesToPoint (Point &pt, const uint8_t *buffer) const |
void | formatPointToBytes (uint8_t *buffer, const Point &pt) const |
void | createAttributesBuffer (AttributesBuffer &buffer, uint64_t n, bool setZero=false) |
void | readAttributesBuffer (AttributesBuffer &buffer, uint64_t n) |
void | writeAttributesBuffer (const AttributesBuffer &buffer, uint64_t n, uint64_t from=0) |
void | copyAttributesBuffer (AttributesBuffer &dst, const AttributesBuffer &src, uint64_t n, uint64_t to=0, uint64_t from=0) |
const std::vector< RecordFile > & | attributeFiles () const |
void | range (size_t id, uint32_t &min, uint32_t &max) |
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 |
Static Public Member Functions | |
static void | move (const std::string &outputPath, const std::string &inputPath) |
static void | remove (const std::string &path) |
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_SEGMENT = 1U << 5 |
Protected Member Functions | |
void | readHeader (Header &hdr) |
void | writeHeader (const Header &hdr) |
void | openAttributeFiles (const std::string &path, bool truncate) |
void | openAttributeFile (RecordFile &file, const std::string &path, const std::string &name, RecordFile::Type recordType, bool truncate) |
Protected Attributes | |
File | file_ |
std::vector< RecordFile > | attributeFiles_ |
LAS Classification.
Enumerator | |
---|---|
CLASS_NEVER_CLASSIFIED | |
CLASS_UNASSIGNED | |
CLASS_GROUND | |
CLASS_LOW_VEGETATION | |
CLASS_MEDIUM_VEGETATION | |
CLASS_HIGH_VEGETATION | |
CLASS_BUILDING |
LasFile::LasFile | ( | ) |
LasFile::~LasFile | ( | ) |
|
inline |
Referenced by IndexFileBuilder::openFiles().
void LasFile::close | ( | ) |
void LasFile::copyAttributesBuffer | ( | AttributesBuffer & | dst, |
const AttributesBuffer & | src, | ||
uint64_t | n, | ||
uint64_t | to = 0, | ||
uint64_t | from = 0 ) |
Referenced by IndexFileBuilder::stateCopyPoints(), and IndexFileBuilder::stateNodeInsert().
void LasFile::create | ( | const std::string & | path | ) |
Referenced by ExportFileFormatLas::create(), create(), and IndexFileBuilder::openFiles().
|
static |
void LasFile::createAttributesBuffer | ( | AttributesBuffer & | buffer, |
uint64_t | n, | ||
bool | setZero = false ) |
void LasFile::formatBytesToPoint | ( | Point & | pt, |
const uint8_t * | buffer ) const |
Referenced by PageData::readPage(), and readPoint().
void LasFile::formatPointToBytes | ( | uint8_t * | buffer, |
const Point & | pt ) const |
Referenced by writePoint().
|
static |
Referenced by IndexFileBuilder::stateEnd().
uint64_t LasFile::offset | ( | ) | const |
Referenced by create(), IndexFileBuilder::openFiles(), seek(), seekPoint(), and LasFile::Header::set().
bool LasFile::open | ( | ) | const |
void LasFile::open | ( | const std::string & | path | ) |
|
protected |
Referenced by openAttributeFiles().
|
protected |
void LasFile::range | ( | size_t | id, |
uint32_t & | min, | ||
uint32_t & | max ) |
void LasFile::readAttributesBuffer | ( | AttributesBuffer & | buffer, |
uint64_t | n ) |
void LasFile::readBuffer | ( | uint8_t * | buffer, |
uint64_t | nbyte ) |
void LasFile::readHeader | ( | ) |
Referenced by IndexFileBuilder::openFiles(), readHeader(), and IndexFileBuilder::stateCreateAttributes().
|
protected |
void LasFile::readPoint | ( | Point & | pt | ) |
|
static |
Referenced by IndexFileBuilder::stateEnd().
void LasFile::seek | ( | uint64_t | offset | ) |
void LasFile::seekExtendedVlr | ( | ) |
void LasFile::seekHeader | ( | ) |
void LasFile::seekPoint | ( | uint64_t | index | ) |
void LasFile::seekPointData | ( | ) |
void LasFile::seekVlr | ( | ) |
uint64_t LasFile::size | ( | ) | const |
Referenced by IndexFileBuilder::openFiles().
void LasFile::transform | ( | double & | x, |
double & | y, | ||
double & | z, | ||
const Point & | pt ) const |
void LasFile::transform | ( | double & | x, |
double & | y, | ||
double & | z, | ||
const uint8_t * | buffer ) const |
void LasFile::transformInvert | ( | double & | x, |
double & | y, | ||
double & | z ) const |
void LasFile::writeAttributesBuffer | ( | const AttributesBuffer & | buffer, |
uint64_t | n, | ||
uint64_t | from = 0 ) |
void LasFile::writeBuffer | ( | const uint8_t * | buffer, |
uint64_t | nbyte ) |
void LasFile::writeHeader | ( | ) |
Referenced by ExportFileFormatLas::create(), create(), IndexFileBuilder::openFiles(), and writeHeader().
|
protected |
void LasFile::writePoint | ( | const Point & | pt | ) |
Referenced by create(), and ExportFileFormatLas::write().
|
protected |
Referenced by close(), createAttributesBuffer(), openAttributeFiles(), range(), readAttributesBuffer(), readPoint(), seekPoint(), writeAttributesBuffer(), and writePoint().
|
protected |
Referenced by close(), create(), offset(), open(), open(), readBuffer(), readHeader(), readPoint(), seek(), seekExtendedVlr(), seekHeader(), seekPoint(), seekPointData(), seekVlr(), size(), writeBuffer(), writeHeader(), and writePoint().
|
static |
Referenced by ExportFileFormatCsv::create(), and ExportFileFormatCsv::write().
|
static |
Referenced by ExportFileFormatCsv::create(), and ExportFileFormatCsv::write().
|
static |
LAS Attribute.
Referenced by ExportFileProperties::clear().
|
static |
Referenced by ExportFileFormatCsv::create(), LasFile::Format::las(), and ExportFileFormatCsv::write().
|
static |
Referenced by ExportFileFormatCsv::create(), and ExportFileFormatCsv::write().
|
static |
Header LasFile::header |
Referenced by create(), ExportFileFormatLas::create(), create(), formatBytesToPoint(), IndexFileBuilder::formatPoint(), IndexFileBuilder::nextState(), open(), IndexFileBuilder::openFiles(), range(), readHeader(), PageData::readPage(), readPoint(), seekExtendedVlr(), seekPoint(), seekPointData(), seekVlr(), IndexFileBuilder::stateCopyPoints(), transform(), transform(), transformInvert(), writeHeader(), PageData::writePage(), and writePoint().