Search in sources :

Example 1 with MinVisitor

use of org.geotools.feature.visitor.MinVisitor in project incubator-rya by apache.

the class GeoWaveFeatureReaderTest method testMin.

@Test
public void testMin() throws IllegalArgumentException, NoSuchElementException, IOException {
    final FeatureReader<SimpleFeatureType, SimpleFeature> reader = dataStore.getFeatureReader(query, Transaction.AUTO_COMMIT);
    final MinVisitor visitor = new MinVisitor("start", type);
    unwrapDelegatingFeatureReader(reader).getFeatureCollection().accepts(visitor, null);
    assertTrue(visitor.getMin().equals(stime));
}
Also used : SimpleFeatureType(org.opengis.feature.simple.SimpleFeatureType) MinVisitor(org.geotools.feature.visitor.MinVisitor) SimpleFeature(org.opengis.feature.simple.SimpleFeature) Test(org.junit.Test)

Aggregations

MinVisitor (org.geotools.feature.visitor.MinVisitor)1 Test (org.junit.Test)1 SimpleFeature (org.opengis.feature.simple.SimpleFeature)1 SimpleFeatureType (org.opengis.feature.simple.SimpleFeatureType)1