pdal::BOX2D
¶

class
pdal::
BOX2D
¶ BOX2D represents a twodimensional box with doubleprecision bounds.
Subclassed by pdal::BOX3D
Public Functions

BOX2D
()¶ Construct an “empty” bounds box.

BOX2D
(double minx, double miny, double maxx, double maxy)¶ Construct and initialize a bounds box.
 Parameters
minx
: Minimum X value.miny
: Minimum Y value.maxx
: Maximum X value.maxy
: Maximum Y value.

bool
empty
() const¶ Determine whether a bounds box has not had any bounds set.
 Return
 Whether the bounds box is empty.

bool
valid
() const¶ Determine whether a bounds box has had any bounds set.
 Return
 Whether the bounds box is valid.

void
clear
()¶ Clear the bounds box to an empty state.

BOX2D &
grow
(double x, double y)¶ Expand the bounds of the box to include the specified point.
 Parameters
x
: X point location.y
: Y point location.

BOX2D &
grow
(double dist)¶ Expand the bounds of the box in all directions by a specified amount.
 Parameters
dist
: Distance by which to expand the box.

bool
contains
(double x, double y) const¶ Determine if a bounds box contains a point.
 Return
 Whether both dimensions are equal to or less than the maximum box values and equal to or more than the minimum box values.
 Parameters
x
: X dimension value.y
: Y dimension value.

bool
equal
(const BOX2D &other) const¶ Determine if the bounds of this box are the same as that of another box.
Empty bounds boxes are always equal.
 Return
true
if the provided box has equal limits to this box,false
otherwise. Parameters
other
: Bounds box to check for equality.

bool
operator==
(BOX2D const &other) const¶ Determine if the bounds of this box are the same as that of another box.
Empty bounds boxes are always equal.
 Return
true
if the provided box has equal limits to this box,false
otherwise. Parameters
other
: Bounds box to check for equality.

bool
operator!=
(BOX2D const &other) const¶ Determine if the bounds of this box are different from that of another box.
Empty bounds boxes are never unequal.
 Return
true
if the provided box has limits different from this box,false
otherwise. Parameters
other
: Bounds box to check for inequality.

BOX2D &
grow
(const BOX2D &other)¶ Expand this box to contain another box.
 Parameters
other
: Box that this box should contain.

void
clip
(const BOX2D &other)¶ Clip this bounds box by another so it will be contained by the other box.
 Parameters
other
: Clipping box for this box.

bool
contains
(const BOX2D &other) const¶ Determine if another bounds box is contained in this bounds box.
Equal limits are considered to be contained.
 Return
true
if the provided box is contained in this box,false
otherwise. Parameters
other
: Bounds box to check for containment.

bool
overlaps
(const BOX2D &other) const¶ Determine if another box overlaps this box.
 Return
 Whether the provided box overlaps this box.
 Parameters
other
: Box to test for overlap.

std::string
toBox
(uint32_t precision = 8) const¶ Convert this box to a string suitable for use in SQLite.
 Return
 String format of this box.
 Parameters
precision
: Precision for output [default: 8]

std::string
toWKT
(uint32_t precision = 8) const¶ Convert this box to a wellknown text string.
 Return
 String format of this box.
 Parameters
precision
: Precision for output [default: 8]

std::string
toGeoJSON
(uint32_t precision = 8) const¶ Convert this box to a GeoJSON text string.
 Return
 String format of this box.
 Parameters
precision
: Precision for output [default: 8]
Public Members

double
minx
¶ Minimum X value.

double
maxx
¶ Maximum X value.

double
miny
¶ Minimum Y value.

double
maxy
¶ Maximum Y value.
Public Static Functions


class
pdal::
BOX3D
¶ BOX3D represents a threedimensional box with doubleprecision bounds.
Inherits from pdal::BOX2D
Public Functions

BOX3D
()¶ Clear the bounds box to an empty state.

BOX3D
(double minx, double miny, double minz, double maxx, double maxy, double maxz)¶ Construct and initialize a bounds box.
 Parameters
minx
: Minimum X value.miny
: Minimum Y value.minx
: Minimum Z value.maxx
: Maximum X value.maxy
: Maximum Y value.maxz
: Maximum Z value.

bool
empty
() const¶ Determine whether a bounds box has not had any bounds set (is in a state as if defaultconstructed).
 Return
 Whether the bounds box is empty.

bool
valid
() const¶ Determine whether a bounds box has had any bounds set.
 Return
 if the bounds box is not empty

BOX3D &
grow
(double x, double y, double z)¶ Expand the bounds of the box if a value is less than the current minimum or greater than the current maximum.
If the bounds box is currently empty, both minimum and maximum box bounds will be set to the provided value.
 Parameters
x
: X dimension value.y
: Y dimension value.z
: Z dimension value.

void
clear
()¶ Clear the bounds box to an empty state.

bool
contains
(double x, double y, double z) const¶ Determine if a bounds box contains a point.
 Return
 Whether both dimensions are equal to or less than the maximum box values and equal to or more than the minimum box values.
 Parameters
x
: X dimension value.y
: Y dimension value.z
: Z dimension value.

bool
contains
(const BOX3D &other) const¶ Determine if another bounds box is contained in this bounds box.
Equal limits are considered to be contained.
 Return
true
if the provided box is contained in this box,false
otherwise. Parameters
other
: Bounds box to check for containment.

bool
equal
(const BOX3D &other) const¶ Determine if the bounds of this box are the same as that of another box.
Empty bounds boxes are always equal.
 Return
true
if the provided box has equal limits to this box,false
otherwise. Parameters
other
: Bounds box to check for equality.

bool
operator==
(BOX3D const &rhs) const¶ Determine if the bounds of this box are the same as that of another box.
Empty bounds boxes are always equal.
 Return
true
if the provided box has equal limits to this box,false
otherwise. Parameters
other
: Bounds box to check for equality.

bool
operator!=
(BOX3D const &rhs) const¶ Determine if the bounds of this box are different from that of another box.
Empty bounds boxes are never unequal.
 Return
true
if the provided box has limits different from this box,false
otherwise. Parameters
other
: Bounds box to check for inequality.

BOX3D &
grow
(const BOX3D &other)¶ Expand this box to contain another box.
 Parameters
other
: Box that this box should contain.

BOX3D &
grow
(double dist)¶ Expand this box by a specified amount.
 Parameters
dist
: Distance by which box should be expanded.

void
clip
(const BOX3D &other)¶ Clip this bounds box by another so it will be contained by the other box.
 Parameters
other
: Clipping box for this box.

bool
overlaps
(const BOX3D &other) const¶ Determine if another box overlaps this box.
 Return
 Whether the provided box overlaps this box.
 Parameters
other
: Box to test for overlap.

BOX2D
to2d
() const¶ Convert this box to 2dimensional bounding box.
 Return
 Bounding box with Z dimension stripped.

std::string
toBox
(uint32_t precision = 8) const¶ Convert this box to a string suitable for use in SQLite.
 Return
 String format of this box.
 Parameters
precision
: Precision for output [default: 8]

std::string
toWKT
(uint32_t precision = 8) const¶ Convert this box to a wellknown text string.
 Return
 String format of this box.
 Parameters
precision
: Precision for output [default: 8]
Public Static Functions
