/** * Compose a query from the set of constraints. When the provided constraints do not fulfill the * indexed dimensions, compose constraints from statistics. * * @param featureType * @param timeDescriptors * @param statsMap * @param jtsBounds * @param timeBoundsSet * @return */ public static Constraints composeConstraints( final SimpleFeatureType featureType, final TimeDescriptors timeDescriptors, final Map<StatisticsId, InternalDataStatistics<SimpleFeature, ?, ?>> statsMap, final Geometry jtsBounds, final TemporalConstraintsSet timeBoundsSet) { final Constraints timeConstraints = composeTimeConstraints(featureType, timeDescriptors, statsMap, timeBoundsSet); final GeoConstraintsWrapper geoConstraints = composeGeometricConstraints(featureType, statsMap, jtsBounds); return timeConstraints.merge(geoConstraints.getConstraints()); } }