GEOS 3.13.1
geos::operation::BoundaryOp Class Reference

#include <BoundaryOp.h>

Public Member Functions

 BoundaryOp (const geom::Geometry &geom)
 BoundaryOp (const geom::Geometry &geom, const algorithm::BoundaryNodeRule &bnRule)
std::unique_ptr< geom::GeometrygetBoundary ()

Static Public Member Functions

static std::unique_ptr< geom::GeometrygetBoundary (const geom::Geometry &g)
static std::unique_ptr< geom::GeometrygetBoundary (const geom::Geometry &g, const algorithm::BoundaryNodeRule &bnRule)
static bool hasBoundary (const geom::Geometry &geom, const algorithm::BoundaryNodeRule &boundaryNodeRule)

Detailed Description

Computes the boundary of a Geometry. Allows specifying the BoundaryNodeRule to be used. This operation will always return a Geometry of the appropriate dimension for the boundary (even if the input geometry is empty). The boundary of zero-dimensional geometries (Points) is always the empty GeometryCollection.

Author
Martin Davis
Version
1.7

Constructor & Destructor Documentation

◆ BoundaryOp() [1/2]

geos::operation::BoundaryOp::BoundaryOp ( const geom::Geometry & geom)

Creates a new instance for the given geometry.

Parameters
geomthe input geometry

◆ BoundaryOp() [2/2]

geos::operation::BoundaryOp::BoundaryOp ( const geom::Geometry & geom,
const algorithm::BoundaryNodeRule & bnRule )

Creates a new instance for the given geometry.

Parameters
geomthe input geometry
bnRulethe Boundary Node Rule to use

Member Function Documentation

◆ getBoundary() [1/3]

std::unique_ptr< geom::Geometry > geos::operation::BoundaryOp::getBoundary ( )

Gets the computed boundary.

Returns
the boundary geometry

◆ getBoundary() [2/3]

std::unique_ptr< geom::Geometry > geos::operation::BoundaryOp::getBoundary ( const geom::Geometry & g)
static

Computes a geometry representing the boundary of a geometry.

Parameters
gthe input geometry
Returns
the computed boundary

◆ getBoundary() [3/3]

std::unique_ptr< geom::Geometry > geos::operation::BoundaryOp::getBoundary ( const geom::Geometry & g,
const algorithm::BoundaryNodeRule & bnRule )
static

Computes a geometry representing the boundary of a geometry, using an explicit BoundaryNodeRule.

Parameters
gthe input geometry
bnRulethe Boundary Node Rule to use
Returns
the computed boundary

◆ hasBoundary()

bool geos::operation::BoundaryOp::hasBoundary ( const geom::Geometry & geom,
const algorithm::BoundaryNodeRule & boundaryNodeRule )
static

Tests if a geometry has a boundary (it is non-empty). The semantics are:

  • Empty geometries do not have boundaries.
  • Points do not have boundaries.
  • For linear geometries the existence of the boundary is determined by the BoundaryNodeRule.
  • Non-empty polygons always have a boundary.
Parameters
geomthe geometry providing the boundary
boundaryNodeRulethe Boundary Node Rule to use
Returns
true if the boundary exists

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