Package org.opengis.filter

Examples of org.opengis.filter.FilterFactory.literal()


        FilterFactory ff = dataStore.getFilterFactory();
        Filter bbox = ff.bbox("geometry", 0, 0, 10, 10, "4326");
        Filter filter = ff.and(bbox,
        ff.and(
                ff.equals(ff.literal("intProperty"), ff.literal(5)),
                ff.equals(ff.literal("doubleProperty"), ff.literal(5))
                ));
        ff.equals(ff.literal("intProperty"), ff.literal(5));
        SimpleFeatureIterator features = dataStore.getFeatureSource("cpi").getFeatures(filter).features();
        while (features.hasNext()) {
            features.next();
View Full Code Here


        Filter filter = ff.and(bbox,
        ff.and(
                ff.equals(ff.literal("intProperty"), ff.literal(5)),
                ff.equals(ff.literal("doubleProperty"), ff.literal(5))
                ));
        ff.equals(ff.literal("intProperty"), ff.literal(5));
        SimpleFeatureIterator features = dataStore.getFeatureSource("cpi").getFeatures(filter).features();
        while (features.hasNext()) {
            features.next();
        }
        // if we made it here, we passed
View Full Code Here

    @Test
    public void testSingleArc() throws Exception {
        ContentFeatureSource fs = dataStore.getFeatureSource(tname("curves"));
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equal(ff.property(aname("name")), ff.literal("Arc segment"),
                true);
        Query q = new Query(tname("curves"), filter);
        q.getHints().put(Hints.LINEARIZATION_TOLERANCE, 0.1);
        ContentFeatureCollection fc = fs.getFeatures(q);
        assertEquals(1, fc.size());
View Full Code Here

    @Test
    public void testCircularString() throws Exception {
        ContentFeatureSource fs = dataStore.getFeatureSource(tname("curves"));
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equal(ff.property(aname("name")), ff.literal("Arc string"),
                true);
        ContentFeatureCollection fc = fs.getFeatures(filter);
        assertEquals(1, fc.size());
        SimpleFeature feature = DataUtilities.first(fc);
        Geometry g = (Geometry) feature.getDefaultGeometry();
View Full Code Here

    @Test
    public void testCompoundOpen() throws Exception {
        ContentFeatureSource fs = dataStore.getFeatureSource(tname("curves"));
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equal(ff.property(aname("name")),
                ff.literal("Compound line string"), true);
        ContentFeatureCollection fc = fs.getFeatures(filter);
        assertEquals(1, fc.size());
        SimpleFeature feature = DataUtilities.first(fc);
        Geometry g = (Geometry) feature.getDefaultGeometry();
        assertNotNull(g);
View Full Code Here

    @Test
    public void testCompoundClosed() throws Exception {
        ContentFeatureSource fs = dataStore.getFeatureSource(tname("curves"));
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equal(ff.property(aname("name")),
                ff.literal("Closed mixed line"), true);
        ContentFeatureCollection fc = fs.getFeatures(filter);
        assertEquals(1, fc.size());
        SimpleFeature feature = DataUtilities.first(fc);
        Geometry g = (Geometry) feature.getDefaultGeometry();
        assertNotNull(g);
View Full Code Here

    @Test
    public void testCircle() throws Exception {
        ContentFeatureSource fs = dataStore.getFeatureSource(tname("curves"));
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equal(ff.property(aname("name")), ff.literal("Circle"), true);
        ContentFeatureCollection fc = fs.getFeatures(filter);
        assertEquals(1, fc.size());
        SimpleFeature feature = DataUtilities.first(fc);
        Geometry g = (Geometry) feature.getDefaultGeometry();
        assertNotNull(g);
View Full Code Here

    @Test
    public void testCompoundPolygon() throws Exception {
        ContentFeatureSource fs = dataStore.getFeatureSource(tname("curves"));
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equal(ff.property(aname("name")),
                ff.literal("Compound polygon"), true);
        ContentFeatureCollection fc = fs.getFeatures(filter);
        assertEquals(1, fc.size());
        SimpleFeature feature = DataUtilities.first(fc);
        Geometry g = (Geometry) feature.getDefaultGeometry();
        assertNotNull(g);
View Full Code Here

    @Test
    public void testCompoundPolygonWithHole() throws Exception {
        ContentFeatureSource fs = dataStore.getFeatureSource(tname("curves"));
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equal(ff.property(aname("name")),
                ff.literal("Compound polygon with hole"), true);
        ContentFeatureCollection fc = fs.getFeatures(filter);
        assertEquals(1, fc.size());
        SimpleFeature feature = DataUtilities.first(fc);
        Geometry g = (Geometry) feature.getDefaultGeometry();
        assertNotNull(g);
View Full Code Here

    @Test
    public void testMultipolygon() throws Exception {
        ContentFeatureSource fs = dataStore.getFeatureSource(tname("curves"));
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo filter = ff.equal(ff.property(aname("name")),
                ff.literal("Multipolygon with curves"), true);
        ContentFeatureCollection fc = fs.getFeatures(filter);
        assertEquals(1, fc.size());
        SimpleFeature feature = DataUtilities.first(fc);
        Geometry g = (Geometry) feature.getDefaultGeometry();
        assertNotNull(g);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.