Package org.locationtech.jts.geom
Class OctagonalEnvelope
- java.lang.Object
-
- org.locationtech.jts.geom.OctagonalEnvelope
-
public class OctagonalEnvelope extends Object
A bounding container for aGeometrywhich 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).
-
-
Constructor Summary
Constructors Constructor Description OctagonalEnvelope()Creates a new null bounding octagonOctagonalEnvelope(Coordinate p)Creates a new null bounding octagon bounding aCoordinateOctagonalEnvelope(Coordinate p0, Coordinate p1)Creates a new null bounding octagon bounding a pair ofCoordinatesOctagonalEnvelope(Envelope env)Creates a new null bounding octagon bounding anEnvelopeOctagonalEnvelope(Geometry geom)Creates a new null bounding octagon bounding aGeometryOctagonalEnvelope(OctagonalEnvelope oct)Creates a new null bounding octagon bounding anOctagonalEnvelope(the copy constructor).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(OctagonalEnvelope other)voidexpandBy(double distance)OctagonalEnvelopeexpandToInclude(double x, double y)OctagonalEnvelopeexpandToInclude(Coordinate p)OctagonalEnvelopeexpandToInclude(CoordinateSequence seq)OctagonalEnvelopeexpandToInclude(Envelope env)voidexpandToInclude(Geometry g)OctagonalEnvelopeexpandToInclude(OctagonalEnvelope oct)doublegetMaxA()doublegetMaxB()doublegetMaxX()doublegetMaxY()doublegetMinA()doublegetMinB()doublegetMinX()doublegetMinY()booleanintersects(Coordinate p)booleanintersects(OctagonalEnvelope other)booleanisNull()static GeometryoctagonalEnvelope(Geometry geom)Gets the octagonal envelope of a geometryvoidsetToNull()Sets the value of this object to the null valueGeometrytoGeometry(GeometryFactory geomFactory)
-
-
-
Constructor Detail
-
OctagonalEnvelope
public OctagonalEnvelope()
Creates a new null bounding octagon
-
OctagonalEnvelope
public OctagonalEnvelope(Coordinate p)
Creates a new null bounding octagon bounding aCoordinate- Parameters:
p- the coordinate to bound
-
OctagonalEnvelope
public OctagonalEnvelope(Coordinate p0, Coordinate p1)
Creates a new null bounding octagon bounding a pair ofCoordinates- Parameters:
p0- a coordinate to boundp1- a coordinate to bound
-
OctagonalEnvelope
public OctagonalEnvelope(Envelope env)
Creates a new null bounding octagon bounding anEnvelope
-
OctagonalEnvelope
public OctagonalEnvelope(OctagonalEnvelope oct)
Creates a new null bounding octagon bounding anOctagonalEnvelope(the copy constructor).
-
-
Method Detail
-
octagonalEnvelope
public static Geometry octagonalEnvelope(Geometry geom)
Gets the octagonal envelope of a geometry- Parameters:
geom- the geometry- Returns:
- the octagonal envelope of the geometry
-
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
public void expandToInclude(Geometry g)
-
expandToInclude
public OctagonalEnvelope expandToInclude(CoordinateSequence seq)
-
expandToInclude
public OctagonalEnvelope expandToInclude(OctagonalEnvelope oct)
-
expandToInclude
public OctagonalEnvelope expandToInclude(Coordinate p)
-
expandToInclude
public OctagonalEnvelope expandToInclude(Envelope env)
-
expandToInclude
public OctagonalEnvelope expandToInclude(double x, double y)
-
expandBy
public void expandBy(double distance)
-
intersects
public boolean intersects(OctagonalEnvelope other)
-
intersects
public boolean intersects(Coordinate p)
-
contains
public boolean contains(OctagonalEnvelope other)
-
toGeometry
public Geometry toGeometry(GeometryFactory geomFactory)
-
-