Package org.opengis.filter

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


     
      DataStore ds = new MemoryDataStore(mm);
      FeatureCache cache = new GridFeatureCache(ds.getFeatureSource(featureType.getTypeName()), 4, 4, MemoryStorage.createInstance());
     
      FilterFactory ff = new FilterFactoryImpl();
      Filter f1 = ff.bbox("the_geom", 0, 0, 4.4, 4.4, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e1 = new Envelope(0, 4.4, 0, 4.4);
     
      Filter f2 = ff.bbox("the_geom", 0, 4.6, 4.4, 8.5, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e2 = new Envelope(0, 4.4, 4.6, 8.5);
     
View Full Code Here


     
      FilterFactory ff = new FilterFactoryImpl();
      Filter f1 = ff.bbox("the_geom", 0, 0, 4.4, 4.4, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e1 = new Envelope(0, 4.4, 0, 4.4);
     
      Filter f2 = ff.bbox("the_geom", 0, 4.6, 4.4, 8.5, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e2 = new Envelope(0, 4.4, 4.6, 8.5);
     
      Filter f3 = ff.bbox("the_geom", 4.6, 0, 8.5, 4.4, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e3 = new Envelope(4.6, 8.5, 0, 4.4);
     
View Full Code Here

      Envelope e1 = new Envelope(0, 4.4, 0, 4.4);
     
      Filter f2 = ff.bbox("the_geom", 0, 4.6, 4.4, 8.5, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e2 = new Envelope(0, 4.4, 4.6, 8.5);
     
      Filter f3 = ff.bbox("the_geom", 4.6, 0, 8.5, 4.4, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e3 = new Envelope(4.6, 8.5, 0, 4.4);
     
      Filter f4 = ff.bbox("the_geom", 4.6, 4.6, 8.5, 8.5, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e4 = new Envelope(4.6, 8.5, 4.6, 8.5);     
View Full Code Here

      Envelope e2 = new Envelope(0, 4.4, 4.6, 8.5);
     
      Filter f3 = ff.bbox("the_geom", 4.6, 0, 8.5, 4.4, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e3 = new Envelope(4.6, 8.5, 0, 4.4);
     
      Filter f4 = ff.bbox("the_geom", 4.6, 4.6, 8.5, 8.5, DefaultEngineeringCRS.CARTESIAN_2D.toString());
      Envelope e4 = new Envelope(4.6, 8.5, 4.6, 8.5);     

      //there should be two features in each region
      FeatureCollection fc = cache.getFeatures(f1);
      assertEquals(2, fc.size());
View Full Code Here

                            env = env.transform(sourceCRS, true);
                        }
                       
                        // build the mixed query
                        Filter original = query.getFilter();
                        Filter bbox = ff.bbox(gd.getLocalName(), env.getMinX(), env.getMinY(), env.getMaxX(), env.getMaxY(), null);
                        query.setFilter(ff.and(original, bbox));

                        // query and eventually reproject
                        features = source.getFeatures(query);
                        if(sourceCRS != null && !CRS.equalsIgnoreMetadata(wgs84, sourceCRS)) {
View Full Code Here

        FeatureSource fs = featureType.getFeatureSource(null, null);
       
        // build the bbox filter
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
       
        BBOX filter = ff.bbox(geom.getLocalName(), nativeEnv.getMinX(),
                nativeEnv.getMinY(), nativeEnv.getMaxX(), nativeEnv.getMaxY(), null);

        // build an optimized query (only the necessary attributes
        Query q = new Query();
        q.setFilter(filter);
View Full Code Here

        FeatureSource fs = featureType.getFeatureSource(null, null);
       
        // build the bbox filter
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
       
        BBOX filter = ff.bbox(geom.getLocalName(), nativeEnv.getMinX(),
                nativeEnv.getMinY(), nativeEnv.getMaxX(), nativeEnv.getMaxY(), null);

        // build an optimized query (only the necessary attributes
        Query q = new Query();
        q.setFilter(filter);
View Full Code Here

    public FeatureIterator getSortedFeatures(GeometryDescriptor geom,
        ReferencedEnvelope latLongEnv, ReferencedEnvelope nativeEnv,
        Connection cacheConn) throws Exception {
        // build the bbox filter
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
        BBOX filter = ff.bbox(geom.getLocalName(), nativeEnv.getMinX(),
                nativeEnv.getMinY(), nativeEnv.getMaxX(), nativeEnv.getMaxY(), null);

        // build an optimized query (only the necessary attributes
        Query q = new Query();
        q.setFilter(filter);
View Full Code Here

                            env = env.transform(sourceCRS, true);
                        }
                       
                        // build the mixed query
                        Filter original = query.getFilter();
                        Filter bbox = ff.bbox(gd.getLocalName(), env.getMinX(), env.getMinY(), env.getMaxX(), env.getMaxY(), null);
                        query.setFilter(ff.and(original, bbox));

                        // query and eventually reproject
                        features = source.getFeatures(query);
                        if(sourceCRS != null && !CRS.equalsIgnoreMetadata(wgs84, sourceCRS)) {
View Full Code Here

        FeatureSource fs = featureType.getFeatureSource(null, null);
       
        // build the bbox filter
        FilterFactory ff = CommonFactoryFinder.getFilterFactory(null);
       
        BBOX filter = ff.bbox(geom.getLocalName(), nativeEnv.getMinX(),
                nativeEnv.getMinY(), nativeEnv.getMaxX(), nativeEnv.getMaxY(), null);

        // build an optimized query (only the necessary attributes
        Query q = new Query();
        q.setFilter(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.