Package org.opengis.filter

Examples of org.opengis.filter.FilterFactory2.bbox()


        caps.addName(Crosses.NAME);

        final Geometry geom = new GeometryFactory().createPoint(new Coordinate(0, 0));
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        Filter intersects = ff.intersects(ff.property("geom"), ff.literal(geom));
        Filter bbox = ff.bbox(ff.property("geom"), 0, 0, 1, 1, "EPSG:4326");

        // if the filter is an Or we can't know
        Filter filter = ff.or(intersects, bbox);
        Filter[] splitted = strategy.splitFilters(caps, filter);
        Filter supported = splitted[0];
View Full Code Here


        ds.setAxisOrder(WFSDataStore.AXIS_ORDER_COMPLIANT, WFSDataStore.AXIS_ORDER_NORTH_EAST);
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        Set<FeatureId> fids = new HashSet<FeatureId>();
        fids.add(new FeatureIdImpl("comuni11.2671"));
        Query query = new Query(typeName, ff.bbox("the_geom", 4623055.0, 815134.0, 4629904.0, 820740.0, "EPSG:3857"));
       
        SimpleFeatureSource source = ds.getFeatureSource(typeName);
        source.getFeatures(query).features();
        BBOX filter = (BBOX)wfs.getRequest().getFilter();
       
View Full Code Here

        ds.setAxisOrder(WFSDataStore.AXIS_ORDER_COMPLIANT, WFSDataStore.AXIS_ORDER_EAST_NORTH);
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        Set<FeatureId> fids = new HashSet<FeatureId>();
        fids.add(new FeatureIdImpl("comuni11.2671"));
        Query query = new Query(typeName, ff.bbox("the_geom", 4623055.0, 815134.0, 4629904.0, 820740.0, "EPSG:3857"));
       
        SimpleFeatureSource source = ds.getFeatureSource(typeName);
        source.getFeatures(query).features();
        BBOX filter = (BBOX)wfs.getRequest().getFilter();
       
View Full Code Here

        ds.setAxisOrder(WFSDataStore.AXIS_ORDER_COMPLIANT, WFSDataStore.AXIS_ORDER_COMPLIANT);
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        Set<FeatureId> fids = new HashSet<FeatureId>();
        fids.add(new FeatureIdImpl("comuni11.2671"));
        Query query = new Query(typeName, ff.bbox("the_geom", 4623055.0, 815134.0, 4629904.0, 820740.0, "EPSG:3857"));
       
        SimpleFeatureSource source = ds.getFeatureSource(typeName);
        source.getFeatures(query).features();
        BBOX filter = (BBOX)wfs.getRequest().getFilter();
       
View Full Code Here

        SimpleFeatureSource source = wfs.getFeatureSource(typeName);
        SimpleFeature sf = getSampleSimpleFeature(source);
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        PropertyName bboxProperty = ff.property(sf.getDefaultGeometryProperty().getName());
        Query query = new Query(typeName, ff.bbox(bboxProperty, sf.getBounds()));
        iterate(source.getFeatures(query), 6, true);       
    }

    @Test
    public void testGetFeaturesByIdAndBBox() throws Exception {
View Full Code Here

       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        PropertyName bboxProperty = ff.property(sf.getDefaultGeometryProperty().getName());
        Query query = new Query(typeName, ff.and(
                ff.id(fids),
                ff.bbox(bboxProperty, sf.getBounds())));
        iterate(source.getFeatures(query), 1, false);       
    }   
   
    @Test
    public void testGetFeaturesByBBoxAndId() throws Exception {
View Full Code Here

        fids.add(new FeatureIdImpl("comuni11.2671"));
       
        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        PropertyName bboxProperty = ff.property(sf.getDefaultGeometryProperty().getName());
        Query query = new Query(typeName, ff.and(
                ff.bbox(bboxProperty, sf.getBounds()),
                ff.id(fids)));
        iterate(source.getFeatures(query), 1, false);       
    }   

    @Test
View Full Code Here

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
        PropertyName bboxProperty = ff.property(sf.getDefaultGeometryProperty().getName());
        Query query = new Query(typeName, ff.and(
                ff.greater(ff.property("cod_reg"), ff.literal(0)),
                ff.and(
                        ff.bbox(bboxProperty, sf.getBounds()),
                        ff.id(fids))));       
        iterate(source.getFeatures(query), 1, true);
       
        query = new Query(typeName, ff.and(
                ff.bbox(bboxProperty, sf.getBounds()),
View Full Code Here

                        ff.bbox(bboxProperty, sf.getBounds()),
                        ff.id(fids))));       
        iterate(source.getFeatures(query), 1, true);
       
        query = new Query(typeName, ff.and(
                ff.bbox(bboxProperty, sf.getBounds()),
                ff.or(
                        ff.bbox(bboxProperty, sf.getBounds()),
                        ff.id(fids))));       
        iterate(source.getFeatures(query), 6, true);
    }   
View Full Code Here

        iterate(source.getFeatures(query), 1, true);
       
        query = new Query(typeName, ff.and(
                ff.bbox(bboxProperty, sf.getBounds()),
                ff.or(
                        ff.bbox(bboxProperty, sf.getBounds()),
                        ff.id(fids))));       
        iterate(source.getFeatures(query), 6, true);
    }   
   
    private SimpleFeature getSampleSimpleFeature(SimpleFeatureSource source) throws IOException {
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.