Package org.locationtech.jts.operation
Class BoundaryOp
- java.lang.Object
-
- org.locationtech.jts.operation.BoundaryOp
-
public class BoundaryOp extends Object
Computes the boundary of aGeometry. Allows specifying theBoundaryNodeRuleto be used. This operation will always return aGeometryof the appropriate dimension for the boundary (even if the input geometry is empty). The boundary of zero-dimensional geometries (Points) is always the emptyGeometryCollection.- Version:
- 1.7
- Author:
- Martin Davis
-
-
Constructor Summary
Constructors Constructor Description BoundaryOp(Geometry geom)Creates a new instance for the given geometry.BoundaryOp(Geometry geom, BoundaryNodeRule bnRule)Creates a new instance for the given geometry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GeometrygetBoundary()Gets the computed boundary.static GeometrygetBoundary(Geometry g)Computes a geometry representing the boundary of a geometry.static GeometrygetBoundary(Geometry g, BoundaryNodeRule bnRule)Computes a geometry representing the boundary of a geometry, using an explicitBoundaryNodeRule.
-
-
-
Constructor Detail
-
BoundaryOp
public BoundaryOp(Geometry geom)
Creates a new instance for the given geometry.- Parameters:
geom- the input geometry
-
BoundaryOp
public BoundaryOp(Geometry geom, BoundaryNodeRule bnRule)
Creates a new instance for the given geometry.- Parameters:
geom- the input geometrybnRule- the Boundary Node Rule to use
-
-
Method Detail
-
getBoundary
public static Geometry getBoundary(Geometry g)
Computes a geometry representing the boundary of a geometry.- Parameters:
g- the input geometry- Returns:
- the computed boundary
-
getBoundary
public static Geometry getBoundary(Geometry g, BoundaryNodeRule bnRule)
Computes a geometry representing the boundary of a geometry, using an explicitBoundaryNodeRule.- Parameters:
g- the input geometrybnRule- the Boundary Node Rule to use- Returns:
- the computed boundary
-
getBoundary
public Geometry getBoundary()
Gets the computed boundary.- Returns:
- the boundary geometry
-
-