Examples of bbox()


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

    public void testLooseBboxFilter() throws Exception {
        ((OracleDialect) dataStore.getSQLDialect()).setLooseBBOXEnabled(true);
       
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        // should match only "r2"
        BBOX bbox = ff.bbox(aname("geom"), 2, 3.5, 4, 4.5, "EPSG:4326");
        FeatureCollection features = dataStore.getFeatureSource(tname("road")).getFeatures(bbox);
        checkSingleResult(features, "r2");
    }

    // As reported in GEOS-4384 (http://jira.codehaus.org/browse/GEOS-4384)
View Full Code Here

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

    }
   
    //Ensure that we exercise the composite primary index with bbox sql
    public void testIt() throws Exception {
        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))
                ));
View Full Code Here

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

    }

    public void testEnvelopeBboxFilter() throws Exception {
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        // should match only "r2"
        BBOX bbox = ff.bbox(aname("geom"), 2, 3, 4, 5, "EPSG:4326");
        ReferencedEnvelope bounds = dataStore.getFeatureSource(tname("road")).getBounds(
                new Query(null, bbox));
        assertEquals(3, bounds.getMinX(), 1e-3d);
        assertEquals(3, bounds.getMaxX(), 1e-3d);
        assertEquals(0, bounds.getMinY(), 1e-3d);
View Full Code Here

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

    }

    public void testCountBboxFilter() throws Exception {
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        // should match only "r2"
        BBOX bbox = ff.bbox(aname("geom"), 2, 3, 4, 5, "EPSG:4326");
        int count = dataStore.getFeatureSource(tname("road")).getCount(new Query(null, bbox));
        assertEquals(1, count);
    }
}
View Full Code Here

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

public class SolrGeometryTest extends SolrTestSupport {
    public void testBBOXLimitSplittedFilter() throws Exception {
        init();
        FilterFactory ff = dataStore.getFilterFactory();
        BBOX bbox = ff.bbox("geo", -185, -98, 185, 98, "EPSG:" + SOURCE_SRID);
        SimpleFeatureCollection features = featureSource.getFeatures(bbox);
        assertEquals(11, features.size());
    }
    public void testPolygonLimitSplittedFilter() throws Exception {
        init();
View Full Code Here

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

    public void testClipToWorldFilter() throws Exception {
        init();
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo property = ff.equals(ff.property("standard_ss"),
                ff.literal("IEEE 802.11b"));
        BBOX bbox = ff.bbox("geo", -190, -190, 190, 190, "EPSG:" + SOURCE_SRID);
        And filter = ff.and(property, bbox);
        SimpleFeatureCollection features = featureSource.getFeatures(filter);
        assertEquals(7, features.size());
    }
    public void testCrossesFilter() throws Exception {
View Full Code Here

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

    public void testGetFeaturesWithAndLogicFilter() throws Exception {
        init();
        FilterFactory ff = dataStore.getFilterFactory();
        PropertyIsEqualTo property = ff.equals(ff.property("standard_ss"),
                ff.literal("IEEE 802.11b"));
        BBOX bbox = ff.bbox("geo", -1, -1, 10, 10, "EPSG:" + SOURCE_SRID);
        And filter = ff.and(property, bbox);
        SimpleFeatureCollection features = featureSource.getFeatures(filter);
        assertEquals(3, features.size());
    }
View Full Code Here

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

                    }

                    if( bbox==null ){
                        query2=query;
                    }else{
                        BBOX newFilter = fac.bbox(attName, bbox.getMinX(), bbox.getMinY(),
                                bbox.getMaxX(), bbox.getMaxY(), "EPSG:4326");
                       
                        query2 = new Query(query);
                        query2.setFilter(newFilter);
                    }
View Full Code Here

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

        try {

            SimpleFeatureType schema = layer.getSchema();
            Name geom = getGeometryAttDescriptor(schema).getName();

            Filter bboxFilter = factory.bbox(factory.property(geom), boundingBox);

            return bboxFilter;
        } catch (Exception e) {
            ProjectPlugin.getPlugin().log(e);
            return Filter.EXCLUDE;
View Full Code Here

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

   
    SimpleFeatureType featureType = editLayer.getSchema();   
    String geomName = featureType.getGeometryDescriptor().getLocalName();
   
    PropertyName attributeExpr = ff.property(geomName);
    BBOX filter = ff.bbox(attributeExpr, bounds);
   
    FeatureSource<SimpleFeatureType, SimpleFeature> source = editLayer.getResource(FeatureSource.class, monitor);   
    return source.getFeatures(filter);
}
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.