@Override protected ExplicitSpatialQuery newConstraints() { return new ExplicitSpatialQuery(); }
@Override public QueryConstraints build() { if ((crsCode != null) && (geometry == null)) { LOGGER.warn( "CRS code `" + crsCode + "` cannot be applied without a geometry. Ignoring CRS."); } if ((spatialCompareOp != null) && (geometry == null)) { LOGGER.warn( "Spatial compare operator `" + spatialCompareOp.name() + "` cannot be applied without a geometry. Ignoring compare operator."); } if (geometry != null) { // its at least spatial if (timeRanges.length > 0) { // its spatial-temporal return new SpatialTemporalQuery( new ExplicitSpatialTemporalQuery(timeRanges, geometry, crsCode, spatialCompareOp)); } return new SpatialQuery(new ExplicitSpatialQuery(geometry, crsCode, spatialCompareOp)); } else if (timeRanges.length > 0) { // its temporal only return new TemporalQuery(new ExplicitTemporalQuery(timeRanges)); } return new EverythingQuery(); } }
return new SpatialQuery(new ExplicitSpatialQuery(filterGeometry, crsCode));
new GeometryFactory().toGeometry(new Envelope(west, south, east, north)); query = new ExplicitSpatialQuery(bbox); new GeometryFactory().toGeometry(new Envelope(west, south, east, north)); query = new ExplicitSpatialQuery(bbox); } else { System.err.println("USAGE: storename --splits min max --bbox west south east north");
private BasicQuery composeQuery( final GeoConstraintsWrapper geoConstraints, final Constraints temporalConstraints) { // TODO: this actually doesn't boost performance much, if at // all, and one key is missing - the query geometry has to be // topologically equivalent to its envelope and the ingested // geometry has to be topologically equivalent to its envelope // this could be kept as a statistic on ingest, but considering // it doesn't boost performance it may not be worthwhile // pursuing // if (geoConstraints.isConstraintsMatchGeometry()) { // return new BasicQuery( // geoConstraints.getConstraints().merge( // temporalConstraints)); // } // else { return new ExplicitSpatialQuery( geoConstraints.getConstraints().merge(temporalConstraints), geoConstraints.getGeometry(), GeometryUtils.getCrsCode( components.getAdapter().getFeatureType().getCoordinateReferenceSystem())); // } }
baseQuery = new ExplicitSpatialQuery(constraints, geometry, extractedCompareOp); } else { baseQuery = new ExplicitSpatialQuery( constraints, geometry,