Package noaa.coastwatch.util.trans
Class BoundaryHandler
java.lang.Object
noaa.coastwatch.util.trans.BoundaryHandler
The
BoundaryHandler
class handles lines of EarthLocation
data that cross boundaries in an EarthTransform
and provides
splitting geometries for the boundary, as well as a predictate function
for testing boundary cuts.- Since:
- 3.5.1
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorDescriptionBoundaryHandler
(BiPredicate<EarthLocation, EarthLocation> cutTest, List<List<EarthLocation>> lineList) Creates a new handler. -
Method Summary
Modifier and TypeMethodDescriptionorg.locationtech.jts.geom.Geometry
Gets the boundary splitting geometry for this handler to perform splits on earth location lines and polygons.boolean
Determines if a line joining two earth locations crosses a boundary cut line in this handler, according to the cut test.
-
Constructor Details
-
BoundaryHandler
public BoundaryHandler(BiPredicate<EarthLocation, EarthLocation> cutTest, List<List<EarthLocation>> lineList) Creates a new handler.- Parameters:
cutTest
- the test function for cuts conforming toisBoundaryCut(noaa.coastwatch.util.EarthLocation, noaa.coastwatch.util.EarthLocation)
.lineList
- the list of location lines to use for boundary splitting.
-
-
Method Details
-
isBoundaryCut
Determines if a line joining two earth locations crosses a boundary cut line in this handler, according to the cut test.- Parameters:
a
- the first earth location.b
- the second earth location.- Returns:
- true if the line joining the two locations is cut by a boundary, or false if not.
-
getSplitter
public org.locationtech.jts.geom.Geometry getSplitter()Gets the boundary splitting geometry for this handler to perform splits on earth location lines and polygons.- Returns:
- the geometry to use for splitting.
-