Examples of bbox()


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

        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

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

        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

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

        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

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

       
        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

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

        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

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

        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

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

                        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

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

        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

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");
        Filter crosses = ff.crosses(ff.property("geom"), ff.literal(geom));
        Filter disjoint = ff.disjoint(ff.property("geom"), ff.literal(geom));
        Filter nonSpatial = ff.equals(ff.property("name"), ff.literal("test"));

        Filter filter = ff.and(Arrays.asList(new Filter[] { intersects, bbox, crosses, disjoint,
View Full Code Here

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

    CoordinateReferenceSystem targetCRS = schema.getGeometryDescriptor()
            .getCoordinateReferenceSystem();
   
    ReferencedEnvelope bbox = new ReferencedEnvelope(x1, y1, x2, y2, targetCRS);
   
    Filter filter = ff.bbox(ff.property(geometryPropertyName), bbox);
    return featureSource.getFeatures(filter);
}

// grabFeaturesInBoundingBox end
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.