double minx = -90.0, maxx = 90.0, miny = -180.0, maxy = 180.0;
DataStatistics<SimpleFeature> bboxStats = null;
if (query.getFilter().equals(
Filter.INCLUDE)) {
Map<ByteArrayId, DataStatistics<SimpleFeature>> stats = this.components.getDataStatistics(new GeoWaveEmptyTransaction(
this.components));
bboxStats = stats.get(BoundingBoxDataStatistics.STATS_ID);
}
if (bboxStats != null) {
minx = ((BoundingBoxDataStatistics) bboxStats).getMinX();
maxx = ((BoundingBoxDataStatistics) bboxStats).getMaxX();
miny = ((BoundingBoxDataStatistics) bboxStats).getMinY();
maxy = ((BoundingBoxDataStatistics) bboxStats).getMaxY();
}
else {
final FeatureReader<SimpleFeatureType, SimpleFeature> reader = new GeoWaveFeatureReader(
query,
new GeoWaveEmptyTransaction(
this.components),
this.components);
if (reader.hasNext()) {
minx = 90.0;
maxx = -90.0;