Package org.locationtech.jts.geom
Class OctagonalEnvelope
java.lang.Object
org.locationtech.jts.geom.OctagonalEnvelope
A bounding container for a
Geometry
which is in the shape of a general octagon.
The OctagonalEnvelope of a geometric object
is a geometry which is a tight bound
along the (up to) four extremal rectilinear parallels
and along the (up to) four extremal diagonal parallels.
Depending on the shape of the contained
geometry, the octagon may be degenerate to any extreme
(e.g. it may be a rectangle, a line, or a point).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new null bounding octagonCreates a new null bounding octagon bounding aCoordinate
OctagonalEnvelope
(Coordinate p0, Coordinate p1) Creates a new null bounding octagon bounding a pair ofCoordinate
sCreates a new null bounding octagon bounding anEnvelope
OctagonalEnvelope
(Geometry geom) Creates a new null bounding octagon bounding aGeometry
Creates a new null bounding octagon bounding anOctagonalEnvelope
(the copy constructor). -
Method Summary
Modifier and TypeMethodDescriptionprivate static double
computeA
(double x, double y) private static double
computeB
(double x, double y) boolean
contains
(OctagonalEnvelope other) void
expandBy
(double distance) expandToInclude
(double x, double y) expandToInclude
(Envelope env) void
double
getMaxA()
double
getMaxB()
double
getMaxX()
double
getMaxY()
double
getMinA()
double
getMinB()
double
getMinX()
double
getMinY()
boolean
boolean
intersects
(OctagonalEnvelope other) boolean
isNull()
private boolean
isValid()
Tests if the extremal values for this octagon are valid.static Geometry
octagonalEnvelope
(Geometry geom) Gets the octagonal envelope of a geometryvoid
Sets the value of this object to the null valuetoGeometry
(GeometryFactory geomFactory)
-
Field Details
-
SQRT2
private static double SQRT2 -
minX
private double minX -
maxX
private double maxX -
minY
private double minY -
maxY
private double maxY -
minA
private double minA -
maxA
private double maxA -
minB
private double minB -
maxB
private double maxB
-
-
Constructor Details
-
OctagonalEnvelope
public OctagonalEnvelope()Creates a new null bounding octagon -
OctagonalEnvelope
Creates a new null bounding octagon bounding aCoordinate
- Parameters:
p
- the coordinate to bound
-
OctagonalEnvelope
Creates a new null bounding octagon bounding a pair ofCoordinate
s- Parameters:
p0
- a coordinate to boundp1
- a coordinate to bound
-
OctagonalEnvelope
Creates a new null bounding octagon bounding anEnvelope
-
OctagonalEnvelope
Creates a new null bounding octagon bounding anOctagonalEnvelope
(the copy constructor). -
OctagonalEnvelope
Creates a new null bounding octagon bounding aGeometry
-
-
Method Details
-
octagonalEnvelope
Gets the octagonal envelope of a geometry- Parameters:
geom
- the geometry- Returns:
- the octagonal envelope of the geometry
-
computeA
private static double computeA(double x, double y) -
computeB
private static double computeB(double x, double y) -
getMinX
public double getMinX() -
getMaxX
public double getMaxX() -
getMinY
public double getMinY() -
getMaxY
public double getMaxY() -
getMinA
public double getMinA() -
getMaxA
public double getMaxA() -
getMinB
public double getMinB() -
getMaxB
public double getMaxB() -
isNull
public boolean isNull() -
setToNull
public void setToNull()Sets the value of this object to the null value -
expandToInclude
-
expandToInclude
-
expandToInclude
-
expandToInclude
-
expandToInclude
-
expandToInclude
-
expandBy
public void expandBy(double distance) -
isValid
private boolean isValid()Tests if the extremal values for this octagon are valid.- Returns:
true
if this object has valid values
-
intersects
-
intersects
-
contains
-
toGeometry
-