Search in sources :

Example 1 with ExplicitCQLQuery

use of org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery in project geowave by locationtech.

the class CQLQueryTest method testGeoWithTemporalIndex.

@Test
public void testGeoWithTemporalIndex() throws CQLException {
    final ExplicitCQLQuery query = (ExplicitCQLQuery) OptimalCQLQuery.createOptimalQuery("BBOX(geometry,27.20,41.30,27.30,41.20)", adapter, null, null);
    assertTrue(query.getIndexConstraints(SPATIAL_TEMPORAL_INDEX).isEmpty());
}
Also used : ExplicitCQLQuery(org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery) Test(org.junit.Test)

Example 2 with ExplicitCQLQuery

use of org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery in project geowave by locationtech.

the class CQLQueryTest method testGeoAndTemporalWithNonMatchingIndex.

@Test
public void testGeoAndTemporalWithNonMatchingIndex() throws CQLException {
    final ExplicitCQLQuery query = (ExplicitCQLQuery) OptimalCQLQuery.createOptimalQuery("BBOX(geometry,27.20,41.30,27.30,41.20) and when during 2005-05-19T20:32:56Z/2005-05-19T21:32:56Z", adapter, null, null);
    final List<MultiDimensionalNumericData> constraints = query.getIndexConstraints(SPATIAL_INDEX);
    assertTrue(Arrays.equals(constraints.get(0).getMinValuesPerDimension(), new Double[] { 27.2, 41.2 }));
    assertTrue(Arrays.equals(constraints.get(0).getMaxValuesPerDimension(), new Double[] { 27.3, 41.3 }));
}
Also used : MultiDimensionalNumericData(org.locationtech.geowave.core.index.numeric.MultiDimensionalNumericData) ExplicitCQLQuery(org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery) Test(org.junit.Test)

Example 3 with ExplicitCQLQuery

use of org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery in project geowave by locationtech.

the class CQLQueryTest method testNoConstraintsWithTemporalIndex.

@Test
public void testNoConstraintsWithTemporalIndex() throws CQLException {
    final ExplicitCQLQuery query = (ExplicitCQLQuery) OptimalCQLQuery.createOptimalQuery("pid = '10'", adapter, null, null);
    assertTrue(query.getIndexConstraints(SPATIAL_TEMPORAL_INDEX).isEmpty());
}
Also used : ExplicitCQLQuery(org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery) Test(org.junit.Test)

Example 4 with ExplicitCQLQuery

use of org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery in project geowave by locationtech.

the class CQLQueryTest method testNoConstraintsWithGeoIndex.

@Test
public void testNoConstraintsWithGeoIndex() throws CQLException {
    final ExplicitCQLQuery query = (ExplicitCQLQuery) OptimalCQLQuery.createOptimalQuery("pid = '10'", adapter, null, null);
    assertTrue(query.getIndexConstraints(SPATIAL_INDEX).isEmpty());
}
Also used : ExplicitCQLQuery(org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery) Test(org.junit.Test)

Example 5 with ExplicitCQLQuery

use of org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery in project geowave by locationtech.

the class CQLQueryTest method testGeoWithMatchingIndex.

@Test
public void testGeoWithMatchingIndex() throws CQLException {
    final ExplicitCQLQuery query = (ExplicitCQLQuery) OptimalCQLQuery.createOptimalQuery("BBOX(geometry,27.20,41.30,27.30,41.20)", adapter, null, null);
    final List<MultiDimensionalNumericData> constraints = query.getIndexConstraints(SPATIAL_INDEX);
    assertTrue(Arrays.equals(constraints.get(0).getMinValuesPerDimension(), new Double[] { 27.2, 41.2 }));
    assertTrue(Arrays.equals(constraints.get(0).getMaxValuesPerDimension(), new Double[] { 27.3, 41.3 }));
}
Also used : MultiDimensionalNumericData(org.locationtech.geowave.core.index.numeric.MultiDimensionalNumericData) ExplicitCQLQuery(org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 ExplicitCQLQuery (org.locationtech.geowave.core.geotime.store.query.ExplicitCQLQuery)8 MultiDimensionalNumericData (org.locationtech.geowave.core.index.numeric.MultiDimensionalNumericData)4 FeatureDataAdapter (org.locationtech.geowave.adapter.vector.FeatureDataAdapter)2 InternalGeotoolsFeatureDataAdapter (org.locationtech.geowave.core.geotime.store.InternalGeotoolsFeatureDataAdapter)2 SimpleFeature (org.opengis.feature.simple.SimpleFeature)2 ArrayList (java.util.ArrayList)1 FilterFactoryImpl (org.geotools.filter.FilterFactoryImpl)1 SpatialOptions (org.locationtech.geowave.core.geotime.index.SpatialOptions)1 AdapterToIndexMapping (org.locationtech.geowave.core.store.AdapterToIndexMapping)1 Index (org.locationtech.geowave.core.store.api.Index)1 FilterList (org.locationtech.geowave.core.store.query.filter.FilterList)1 QueryFilter (org.locationtech.geowave.core.store.query.filter.QueryFilter)1 SimpleFeatureType (org.opengis.feature.simple.SimpleFeatureType)1 Filter (org.opengis.filter.Filter)1 Expression (org.opengis.filter.expression.Expression)1