Class BoundaryOp
- Namespace
- NetTopologySuite.Operation
- Assembly
- NetTopologySuite.dll
Computes the boundary of a Geometry. Allows specifying the IBoundaryNodeRule 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.
public class BoundaryOp
- Inheritance
-
BoundaryOp
- Inherited Members
Constructors
BoundaryOp(Geometry)
Initializes a new instance of the BoundaryOp class for the given geometry.
public BoundaryOp(Geometry geom)
Parameters
geom
GeometryThe input geometry.
BoundaryOp(Geometry, IBoundaryNodeRule)
Initializes a new instance of the BoundaryOp class for the given geometry.
public BoundaryOp(Geometry geom, IBoundaryNodeRule bnRule)
Parameters
geom
GeometryThe input geometry.
bnRule
IBoundaryNodeRuleTthe Boundary Node Rule to use.
Methods
GetBoundary()
Gets the computed boundary.
public Geometry GetBoundary()
Returns
- Geometry
The boundary geometry.
GetBoundary(Geometry)
Computes a geometry representing the boundary of a geometry.
public static Geometry GetBoundary(Geometry g)
Parameters
g
GeometryThe input geometry.
Returns
- Geometry
The computed boundary.
GetBoundary(Geometry, IBoundaryNodeRule)
Computes a geometry representing the boundary of a geometry, using an explicit IBoundaryNodeRule.
public static Geometry GetBoundary(Geometry g, IBoundaryNodeRule bnRule)
Parameters
g
GeometryThe input geometry.
bnRule
IBoundaryNodeRuleThe Boundary Node Rule to use.
Returns
- Geometry
The computed boundary.
HasBoundary(Geometry, IBoundaryNodeRule)
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 IBoundaryNodeRule.
- Non-empty polygons always have a boundary.
public static bool HasBoundary(Geometry geom, IBoundaryNodeRule boundaryNodeRule)
Parameters
geom
GeometryThe geometry providing the boundary
boundaryNodeRule
IBoundaryNodeRuleThe Boundary Node Rule to use
Returns
- bool
true
if the boundary exists