pdal::PointView

class pdal::PointView : public pdal::PointContainer

Public Functions

PointView(const PointView&) = delete
PointView &operator=(const PointView&) = delete
PointView(PointTableRef pointTable)
PointView(PointTableRef pointTable, const SpatialReference &srs)
virtual ~PointView()
PointViewIter begin()
PointViewIter end()
inline int id() const
inline point_count_t size() const
inline bool empty() const
inline void appendPoint(const PointView &buffer, PointId id)
inline void append(const PointView &buf)
inline PointViewPtr makeNew() const

Return a new point view with the same point table as this point buffer.

inline PointRef point(PointId id)
template<class T>
inline T getFieldAs(Dimension::Id dim, PointId pointIndex) const
inline void getField(char *pos, Dimension::Id d, Dimension::Type type, PointId id) const
template<typename T>
void setField(Dimension::Id dim, PointId idx, T val)
inline void setField(Dimension::Id dim, Dimension::Type type, PointId idx, const void *val)
template<typename T>
inline virtual bool compare(Dimension::Id dim, PointId id1, PointId id2) const
inline virtual bool compare(Dimension::Id dim, PointId id1, PointId id2) const
void calculateBounds(BOX2D &box) const
Returns

a cumulated bounds of all points in the PointView.

Note

This method requires that an X, Y, and Z dimension be available, and that it can be casted into a double data type using the pdal::Dimension::applyScaling() method. Otherwise, an exception will be thrown.

void calculateBounds(BOX3D &box) const
void dump(std::ostream &ostr) const
inline bool hasDim(Dimension::Id id) const
inline std::string dimName(Dimension::Id id) const
inline Dimension::IdList dims() const
inline std::size_t pointSize() const
inline std::size_t dimSize(Dimension::Id id) const
inline Dimension::Type dimType(Dimension::Id id) const
inline DimTypeList dimTypes() const
inline virtual PointLayoutPtr layout() const
inline PointTableRef table() const
inline SpatialReference spatialReference() const
inline void getPackedPoint(const DimTypeList &dims, PointId idx, char *buf) const

Fill a buffer with point data specified by the dimension list.

Parameters
  • dims[in] List of dimensions/types to retrieve.

  • idx[in] Index of point to get.

  • buf[in] Pointer to buffer to fill.

inline void setPackedPoint(const DimTypeList &dims, PointId idx, const char *buf)

Load the point buffer from memory whose arrangement is specified by the dimension list.

Parameters
  • dims[in] Dimension/types of data in packed order

  • idx[in] Index of point to write.

  • buf[in] Packed data buffer.

inline char *getPoint(PointId id)

Provides access to the memory storing the point data.

Though this function is public, other access methods are safer and preferred.

inline char *getOrAddPoint(PointId id)

Provides access to the memory storing the point data.

Though this function is public, other access methods are safer and preferred.

inline void clearTemps()
MetadataNode toMetadata() const
void invalidateProducts()
TriangularMesh *createMesh(const std::string &name)

Creates a mesh with the specified name.

Parameters

name – Name of the mesh.

Returns

Pointer to the new mesh. Null is returned if the mesh already exists.

TriangularMesh *mesh(const std::string &name = "")

Get a pointer to a mesh.

Parameters

name – Name of the mesh.

Returns

New mesh. Null is returned if the mesh already exists.

Rasterd *createRaster(const std::string &name, const RasterLimits &limits, double noData = 0)

Creates a raster with the specified name.

Parameters
  • name – Name of the raster.

  • limits – Limits of the raster to create.

Returns

Pointer to the new raster. Null is returned if the raster already exists.

Rasterd *raster(const std::string &name = "")

Get a pointer to a raster.

Parameters

name – Name of the raster.

Returns

Pointer to the New raster. Null

KD3Index &build3dIndex()
KD2Index &build2dIndex()

Friends

friend class plang::Invocation