public class BoundingBoxSearchCriteria<T extends GeospatialPoint> extends Object implements SearchCriteria<T>
SearchCriteria
implementation that matches all points within a
bounding "box." The BoundingBoxSearchCriteria
class is designed to
assist in implementing bounding box search methods specified by the
GeospatialPointDatabase
interface.GeospatialPointDatabase.getAllPointsInBoundingBox(double, double, double, double)
,
GeospatialPointDatabase.getAllPointsInBoundingBox(double, double, double, double, GeospatialPoint)
,
GeospatialPointDatabase.getAllPointsInBoundingBox(double, double, double, double, SearchCriteria)
,
GeospatialPointDatabase.getAllPointsInBoundingBox(double, double, double, double, SearchCriteria, GeospatialPoint)
Constructor and Description |
---|
BoundingBoxSearchCriteria(double west,
double east,
double north,
double south)
Constructs a new set of bounding box search criteria with the given box
limits.
|
BoundingBoxSearchCriteria(double west,
double east,
double north,
double south,
SearchCriteria<T> otherCriteria)
Constructs a new set of bounding box search criteria with the given box
limits and additional search criteria.
|
public BoundingBoxSearchCriteria(double west, double east, double north, double south)
west
- the western limit of the bounding box in degreeseast
- the eastern limit of the bounding box in degreesnorth
- the northern limit of the bounding box in degreessouth
- the southern limit of the bounding box in degreespublic BoundingBoxSearchCriteria(double west, double east, double north, double south, SearchCriteria<T> otherCriteria)
west
- the western limit of the bounding box in degreeseast
- the eastern limit of the bounding box in degreesnorth
- the northern limit of the bounding box in degreessouth
- the southern limit of the bounding box in degreesotherCriteria
- additional criteria to apply after testing a point
for presence inside the bounding box limits; may be
null
public boolean matches(T point)
matches
in interface SearchCriteria<T extends GeospatialPoint>
point
- the point to test for presence inside the bounding boxtrue
if the point is inside the bounding box and
satisfies the additional search criteria (if not null
) or
false
otherwisejeospatial is an open-source library hosted at https://github.com/jchambers/jeospatial.