Package noaa.coastwatch.util
Class Topology
java.lang.Object
noaa.coastwatch.util.Topology
The
Topology
class contains a number of convenience methods
for working with coordinates in a topology.- Since:
- 3.5.1
- Author:
- Peter Hollemans
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
The smallest increment that differentiates two coordinates. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.locationtech.jts.geom.Coordinate
createCoordinate
(double x, double y) Creates a coordinate for the specified values that conforms to the precision model returned bygetModel()
.static org.locationtech.jts.geom.GeometryFactory
Gets the factory for topologies that uses the precision model given bygetModel()
.static org.locationtech.jts.geom.PrecisionModel
getModel()
Gets the precision model for topologies.
-
Field Details
-
EPSILON
public static final double EPSILONThe smallest increment that differentiates two coordinates.- See Also:
-
-
Constructor Details
-
Topology
public Topology()
-
-
Method Details
-
getModel
public static org.locationtech.jts.geom.PrecisionModel getModel()Gets the precision model for topologies. The model has a precision for locations given by theEPSILON
value.- Returns:
- the precision model.
-
getFactory
public static org.locationtech.jts.geom.GeometryFactory getFactory()Gets the factory for topologies that uses the precision model given bygetModel()
.- Returns:
- the factory for creating topology objects.
-
createCoordinate
public static org.locationtech.jts.geom.Coordinate createCoordinate(double x, double y) Creates a coordinate for the specified values that conforms to the precision model returned bygetModel()
.- Parameters:
x
- the coordinate x value.y
- the coordinate y value.- Returns:
- the coordinate with values rounded to the precision model accuracy.
-