libLAS API Reference (svn-trunk)
liblas::Reader Class Reference

Defines public interface to LAS reader implementation. More...

#include <reader.hpp>

Collaboration diagram for liblas::Reader:
Collaboration graph

Public Member Functions

 Reader (std::istream &ifs)
 Consructor initializes reader with input stream as source of LAS records.
 Reader (ReaderIPtr reader)
 Reader (Reader const &other)
Reader & operator= (Reader const &rhs)
 ~Reader ()
 Destructor.
Header const & GetHeader () const
 Provides read-only access to header of LAS file being read.
void SetHeader (Header const &)
Point const & GetPoint () const
 Provides read-only access to current point record.
bool ReadNextPoint ()
 Fetches next point record in file.
bool ReadPointAt (std::size_t n)
 Fetches n-th point record from file.
void Reset ()
 Reinitializes state of the reader.
bool Seek (std::size_t n)
 Move to the specified point to start ReadNextPoint operations.
Point const & operator[] (std::size_t n)
 Provides index-based access to point records.
void SetFilters (std::vector< liblas::FilterPtr > const &filters)
 Sets filters that are used to determine whether or not to keep a point that was read from the file.
std::vector< liblas::FilterPtr > GetFilters () const
 Gets the list of filters to be applied to points as they are read.
void SetTransforms (std::vector< liblas::TransformPtr > const &transforms)
 Sets transforms to apply to points.
std::vector< liblas::TransformPtr > GetTransforms () const
 Gets the list of transforms to be applied to points as they are read.

Detailed Description

Defines public interface to LAS reader implementation.

Constructor & Destructor Documentation

◆ Reader() [1/3]

liblas::Reader::Reader ( std::istream & ifs)

Consructor initializes reader with input stream as source of LAS records.

Parameters
ifs- stream used as source of LAS records.
Exceptions
std::runtime_error- on failure state of the input stream.

Referenced by operator=(), and Reader().

Here is the caller graph for this function:

◆ Reader() [2/3]

liblas::Reader::Reader ( ReaderIPtr reader)

◆ Reader() [3/3]

liblas::Reader::Reader ( Reader const & other)

References Reader().

Here is the call graph for this function:

◆ ~Reader()

liblas::Reader::~Reader ( )

Destructor.

Exceptions
nothrow

Member Function Documentation

◆ GetFilters()

std::vector< liblas::FilterPtr > liblas::Reader::GetFilters ( ) const

Gets the list of filters to be applied to points as they are read.

◆ GetHeader()

Header const & liblas::Reader::GetHeader ( ) const

Provides read-only access to header of LAS file being read.

Exceptions
nothrow

◆ GetPoint()

Point const & liblas::Reader::GetPoint ( ) const

Provides read-only access to current point record.

Exceptions
nothrow

◆ GetTransforms()

std::vector< liblas::TransformPtr > liblas::Reader::GetTransforms ( ) const

Gets the list of transforms to be applied to points as they are read.

◆ operator=()

Reader & liblas::Reader::operator= ( Reader const & rhs)

References Reader().

Here is the call graph for this function:

◆ operator[]()

Point const & liblas::Reader::operator[] ( std::size_t n)

Provides index-based access to point records.

The operator is implemented in terms of ReadPointAt method and is not const-qualified because it updates file stream position.

Exceptions
maythrow std::exception

◆ ReadNextPoint()

bool liblas::Reader::ReadNextPoint ( )

Fetches next point record in file.

Exceptions
maythrow std::exception

◆ ReadPointAt()

bool liblas::Reader::ReadPointAt ( std::size_t n)

Fetches n-th point record from file.

Exceptions
maythrow std::exception

◆ Reset()

void liblas::Reader::Reset ( )

Reinitializes state of the reader.

Exceptions
maythrow std::exception

◆ Seek()

bool liblas::Reader::Seek ( std::size_t n)

Move to the specified point to start ReadNextPoint operations.

Exceptions
maythrow std::exception

◆ SetFilters()

void liblas::Reader::SetFilters ( std::vector< liblas::FilterPtr > const & filters)

Sets filters that are used to determine whether or not to keep a point that was read from the file.

Filters have no effect for reading data at specific locations in the file.
They only affect reading ReadNextPoint-style operations Filters are applied before transforms.

◆ SetHeader()

void liblas::Reader::SetHeader ( Header const & )

◆ SetTransforms()

void liblas::Reader::SetTransforms ( std::vector< liblas::TransformPtr > const & transforms)

Sets transforms to apply to points.

Points are transformed in place in the order of the transform list. Filters are applied before transforms.


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