Package org.apache.lucene.spatial3d.geom
Interface Bounds
- All Known Implementing Classes:
LatLonBounds
,XYZBounds
public interface Bounds
An interface for accumulating bounds information. The bounds object is initially empty. Bounding
points are then applied by supplying (x,y,z) tuples. It is also possible to indicate the
following edge cases:
- No longitude bound possible.
- No upper latitude bound possible.
- No lower latitude bound possible When any of these have been applied, further application of points cannot override that decision.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Method Summary
Modifier and TypeMethodDescriptionaddHorizontalPlane
(PlanetModel planetModel, double latitude, Plane horizontalPlane, Membership... bounds) Add a horizontal plane to the bounds description.addIntersection
(PlanetModel planetModel, Plane plane1, Plane plane2, Membership... bounds) Add the intersection between two planes to the bounds description.addPlane
(PlanetModel planetModel, Plane plane, Membership... bounds) Add a general plane to the bounds description.Add a single point.addVerticalPlane
(PlanetModel planetModel, double longitude, Plane verticalPlane, Membership... bounds) Add a vertical plane to the bounds description.Add an X value.Add a Y value.Add a Z value.isWide()
Signal that the shape exceeds Math.PI in longitude.Signal that there is no bottom latitude bound.noBound
(PlanetModel planetModel) Signal that there is no bound whatsoever.Signal that there is no longitude bound.Signal that there is no top latitude bound.
-
Method Details
-
addPlane
Add a general plane to the bounds description.- Parameters:
planetModel
- is the planet model.plane
- is the plane.bounds
- are the membership bounds for points along the arc.
-
addHorizontalPlane
Bounds addHorizontalPlane(PlanetModel planetModel, double latitude, Plane horizontalPlane, Membership... bounds) Add a horizontal plane to the bounds description. This method should EITHER use the supplied latitude, OR use the supplied plane, depending on what is most efficient.- Parameters:
planetModel
- is the planet model.latitude
- is the latitude.horizontalPlane
- is the plane.bounds
- are the constraints on the plane.- Returns:
- updated Bounds object.
-
addVerticalPlane
Bounds addVerticalPlane(PlanetModel planetModel, double longitude, Plane verticalPlane, Membership... bounds) Add a vertical plane to the bounds description. This method should EITHER use the supplied longitude, OR use the supplied plane, depending on what is most efficient.- Parameters:
planetModel
- is the planet model.longitude
- is the longitude.verticalPlane
- is the plane.bounds
- are the constraints on the plane.- Returns:
- updated Bounds object.
-
addIntersection
Add the intersection between two planes to the bounds description. Where the shape has intersecting planes, it is better to use this method than just adding the point, since this method takes each plane's error envelope into account.- Parameters:
planetModel
- is the planet model.plane1
- is the first plane.plane2
- is the second plane.bounds
- are the membership bounds for the intersection.
-
addPoint
Add a single point.- Parameters:
point
- is the point.- Returns:
- the updated Bounds object.
-
addXValue
Add an X value.- Parameters:
point
- is the point to take the x value from.- Returns:
- the updated object.
-
addYValue
Add a Y value.- Parameters:
point
- is the point to take the y value from.- Returns:
- the updated object.
-
addZValue
Add a Z value.- Parameters:
point
- is the point to take the z value from.- Returns:
- the updated object.
-
isWide
Bounds isWide()Signal that the shape exceeds Math.PI in longitude.- Returns:
- the updated Bounds object.
-
noLongitudeBound
Bounds noLongitudeBound()Signal that there is no longitude bound.- Returns:
- the updated Bounds object.
-
noTopLatitudeBound
Bounds noTopLatitudeBound()Signal that there is no top latitude bound.- Returns:
- the updated Bounds object.
-
noBottomLatitudeBound
Bounds noBottomLatitudeBound()Signal that there is no bottom latitude bound.- Returns:
- the updated Bounds object.
-
noBound
Signal that there is no bound whatsoever. The bound is limited only by the constraints of the planet.- Returns:
- the updated Bounds object.,
-