Package org.apache.lucene.spatial3d.geom
Class StandardXYZSolid
java.lang.Object
org.apache.lucene.spatial3d.geom.BasePlanetObject
org.apache.lucene.spatial3d.geom.BaseXYZSolid
org.apache.lucene.spatial3d.geom.StandardXYZSolid
- All Implemented Interfaces:
GeoArea
,Membership
,PlanetObject
,SerializableObject
,XYZSolid
3D rectangle, bounded on six sides by X,Y,Z limits
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final GeoPoint[]
These are the edge points of the shape, which are defined to be at least one point on each surface area boundary.protected final boolean
Whole world?protected final double
Max-Xprotected final SidedPlane
Max-X planeprotected final boolean
true if maxXPlane intersects globeprotected final double
Max-Yprotected final SidedPlane
Max-Y planeprotected final boolean
true if maxYPlane intersects globeprotected final double
Max-Zprotected final SidedPlane
Max-Z planeprotected final boolean
true if maxZPlane intersects globeprotected final double
Min-Xprotected final SidedPlane
Min-X planeprotected final boolean
true if minXPlane intersects globeprotected final double
Min-Yprotected final SidedPlane
Min-Y planeprotected final boolean
true if minYPlane intersects globeprotected final double
Min-Zprotected final SidedPlane
Min-Z planeprotected final boolean
true if minZPlane intersects globeprotected final GeoPoint[]
Notable points for maxXPlaneprotected final GeoPoint[]
Notable points for maxYPlaneprotected final GeoPoint[]
Notable points for maxZPlaneprotected final GeoPoint[]
Notable points for minXPlaneprotected final GeoPoint[]
Notable points for minYPlaneprotected final GeoPoint[]
Notable points for minZPlaneFields inherited from class org.apache.lucene.spatial3d.geom.BaseXYZSolid
ALL_INSIDE, EMPTY_POINTS, NO_EDGEPOINTS, NONE_INSIDE, SOME_INSIDE, xUnitVector, xVerticalPlane, yUnitVector, yVerticalPlane, zUnitVector
Fields inherited from class org.apache.lucene.spatial3d.geom.BasePlanetObject
planetModel
-
Constructor Summary
ConstructorsConstructorDescriptionStandardXYZSolid
(PlanetModel planetModel, double minX, double maxX, double minY, double maxY, double minZ, double maxZ) Sole constructorStandardXYZSolid
(PlanetModel planetModel, InputStream inputStream) Constructor for deserialization. -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected GeoPoint[]
Get the edge points for this shape.int
getRelationship
(GeoShape path) Find the spatial relationship between a shape and the current geo area.int
hashCode()
boolean
isWithin
(double x, double y, double z) Check if a point is within this shape.toString()
void
write
(OutputStream outputStream) Serialize to output stream.Methods inherited from class org.apache.lucene.spatial3d.geom.BaseXYZSolid
glueTogether, isAreaInsideShape, isShapeInsideArea, isWithin
Methods inherited from class org.apache.lucene.spatial3d.geom.BasePlanetObject
getPlanetModel
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.spatial3d.geom.PlanetObject
getPlanetModel
-
Field Details
-
minX
protected final double minXMin-X -
maxX
protected final double maxXMax-X -
minY
protected final double minYMin-Y -
maxY
protected final double maxYMax-Y -
minZ
protected final double minZMin-Z -
maxZ
protected final double maxZMax-Z -
isWholeWorld
protected final boolean isWholeWorldWhole world? -
minXPlane
Min-X plane -
maxXPlane
Max-X plane -
minYPlane
Min-Y plane -
maxYPlane
Max-Y plane -
minZPlane
Min-Z plane -
maxZPlane
Max-Z plane -
minXPlaneIntersects
protected final boolean minXPlaneIntersectstrue if minXPlane intersects globe -
maxXPlaneIntersects
protected final boolean maxXPlaneIntersectstrue if maxXPlane intersects globe -
minYPlaneIntersects
protected final boolean minYPlaneIntersectstrue if minYPlane intersects globe -
maxYPlaneIntersects
protected final boolean maxYPlaneIntersectstrue if maxYPlane intersects globe -
minZPlaneIntersects
protected final boolean minZPlaneIntersectstrue if minZPlane intersects globe -
maxZPlaneIntersects
protected final boolean maxZPlaneIntersectstrue if maxZPlane intersects globe -
edgePoints
These are the edge points of the shape, which are defined to be at least one point on each surface area boundary. In the case of a solid, this includes points which represent the intersection of XYZ bounding planes and the planet, as well as points representing the intersection of single bounding planes with the planet itself. -
notableMinXPoints
Notable points for minXPlane -
notableMaxXPoints
Notable points for maxXPlane -
notableMinYPoints
Notable points for minYPlane -
notableMaxYPoints
Notable points for maxYPlane -
notableMinZPoints
Notable points for minZPlane -
notableMaxZPoints
Notable points for maxZPlane
-
-
Constructor Details
-
StandardXYZSolid
public StandardXYZSolid(PlanetModel planetModel, double minX, double maxX, double minY, double maxY, double minZ, double maxZ) Sole constructor- Parameters:
planetModel
- is the planet model.minX
- is the minimum X value.maxX
- is the maximum X value.minY
- is the minimum Y value.maxY
- is the maximum Y value.minZ
- is the minimum Z value.maxZ
- is the maximum Z value.
-
StandardXYZSolid
Constructor for deserialization.- Parameters:
planetModel
- is the planet model.inputStream
- is the input stream.- Throws:
IOException
-
-
Method Details
-
write
Description copied from interface:SerializableObject
Serialize to output stream.- Specified by:
write
in interfaceSerializableObject
- Overrides:
write
in classBasePlanetObject
- Parameters:
outputStream
- is the output stream to write to.- Throws:
IOException
-
getEdgePoints
Description copied from class:BaseXYZSolid
Get the edge points for this shape.- Specified by:
getEdgePoints
in classBaseXYZSolid
- Returns:
- the edge points.
-
isWithin
public boolean isWithin(double x, double y, double z) Description copied from interface:Membership
Check if a point is within this shape.- Specified by:
isWithin
in interfaceMembership
- Specified by:
isWithin
in classBaseXYZSolid
- Parameters:
x
- is x coordinate of point to check.y
- is y coordinate of point to check.z
- is z coordinate of point to check.- Returns:
- true if the point is within this shape
-
getRelationship
Description copied from interface:GeoArea
Find the spatial relationship between a shape and the current geo area. Note: return value is how the GeoShape relates to the GeoArea, not the other way around. For example, if this GeoArea is entirely within the shape, then CONTAINS should be returned. If the shape is entirely enclosed by this GeoArea, then WITHIN should be returned.It is permissible to return OVERLAPS instead of WITHIN if the shape intersects with the area at even a single point. So, a circle inscribed in a rectangle could return either OVERLAPS or WITHIN, depending on implementation. It is not permissible to return CONTAINS or DISJOINT in this circumstance, however.
Similarly, it is permissible to return OVERLAPS instead of CONTAINS under conditions where the shape consists of multiple independent overlapping subshapes, and the area overlaps one of the subshapes. It is not permissible to return WITHIN or DISJOINT in this circumstance, however.
- Parameters:
path
- is the shape to consider.- Returns:
- the relationship, from the perspective of the shape.
-
equals
- Overrides:
equals
in classBaseXYZSolid
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBaseXYZSolid
-
toString
-