public class OverlayOp extends GeometryGraphOperation
Geometrys. The overlay can be used to determine any boolean combination of the geometries.
| Modifier and Type | Field and Description |
|---|---|
static int |
DIFFERENCE
The code for the Difference overlay operation.
|
static int |
INTERSECTION
The code for the Intersection overlay operation.
|
static int |
SYMDIFFERENCE
The code for the Symmetric Difference overlay operation.
|
static int |
UNION
The code for the Union overlay operation.
|
arg, li, resultPrecisionModel| Constructor and Description |
|---|
OverlayOp(Geometry
Constructs an instance to compute a single overlay operation for the given geometries.
|
| Modifier and Type | Method and Description |
|---|---|
static Geometry |
createEmptyResult(int overlayOpCode, Geometry
Creates an empty result geometry of the appropriate dimension, based on the given overlay operation and the dimensions of the inputs.
|
PlanarGraph |
getGraph()
Gets the graph constructed to compute the overlay.
|
Geometry |
getResultGeometry(int overlayOpCode)
Gets the result of the overlay for a given overlay operation.
|
protected void |
insertUniqueEdge(Edge
Insert an edge from one of the noded input graphs.
|
boolean |
isCoveredByA(Coordinate
Tests if an L edge should be included in the result or not.
|
boolean |
isCoveredByLA(Coordinate
Tests if a point node should be included in the result or not.
|
static boolean |
isResultOfOp(int loc0, int loc1, int overlayOpCode)
Tests whether a point with given
Locations relative to two geometries is contained in the result of overlaying the geometries using a given overlay operation.
|
static boolean |
isResultOfOp(Label
Tests whether a point with a given topological
Label relative to two geometries is contained in the result of overlaying the geometries using a given overlay operation.
|
static Geometry |
overlayOp(Geometry
Computes an overlay operation for the given geometry arguments.
|
getArgGeometry, setComputationPrecisionpublic static final int INTERSECTION
public static final int UNION
public static final int DIFFERENCE
public static final int SYMDIFFERENCE
public static GeometryoverlayOp(Geometry geom0, Geometry geom1, int opCode)
geom0 - the first geometry argument
geom1 - the second geometry argument
opCode - the code for the desired overlay operation
TopologyException - if a robustness problem is encountered
public static boolean isResultOfOp(Labellabel, int opCode)
Label relative to two geometries is contained in the result of overlaying the geometries using a given overlay operation.
The method handles arguments of Location correctly
label - the topological label of the point
opCode - the code for the overlay operation to test
public static boolean isResultOfOp(int loc0,
int loc1,
int overlayOpCode)
Locations relative to two geometries is contained in the result of overlaying the geometries using a given overlay operation.
The method handles arguments of Location correctly
loc0 - the code for the location in the first geometry
loc1 - the code for the location in the second geometry
overlayOpCode - the code for the overlay operation to test
public GeometrygetResultGeometry(int overlayOpCode)
Note: this method can be called once only.
overlayOpCode - the overlay operation to perform
TopologyException - if a robustness problem is encountered
public PlanarGraphgetGraph()
protected void insertUniqueEdge(Edgee)
public boolean isCoveredByLA(Coordinatecoord)
coord - the point coordinate
public boolean isCoveredByA(Coordinatecoord)
coord - the point coordinate
public static GeometrycreateEmptyResult(int overlayOpCode, Geometry a, Geometry b, GeometryFactory geomFact)
The empty result is constructed using the following rules:
INTERSECTION - result has the dimension of the lowest input dimension UNION - result has the dimension of the highest input dimension DIFFERENCE - result has the dimension of the left-hand input SYMDIFFERENCE - result has the dimension of the highest input dimension (since the symmetric Difference is the union of the differences). overlayOpCode - the code for the overlay operation being performed
a - an input geometry
b - an input geometry
geomFact - the geometry factory being used for the operation