Package org.geotools.filter

Examples of org.geotools.filter.FilterFactoryImpl.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

        .getSchema();
    String localname = ft.getGeometryDescriptor().getLocalName();
    String srs = ft.getGeometryDescriptor().getCoordinateReferenceSystem()
        .toString();

    Filter bb = filterFactory.bbox(localname, x_min, y_min, x_max, y_max,
        srs);

    int cnt = rawDataset.getFeatureSource("mycollection").getFeatures(bb)
        .size();
    assertEquals(numFeatures, rawDataset.getFeatureSource("mycollection")
View Full Code Here

    FilterFactory filterFactory = new FilterFactoryImpl();
    FeatureType ft = rawDataset.getFeatureSource("mycollection").getSchema();
    String localname = ft.getGeometryDescriptor().getLocalName();
    String srs = ft.getGeometryDescriptor().getCoordinateReferenceSystem().toString();

    Filter bb = filterFactory.bbox(localname, x_min, y_min, x_max, y_max,srs);
    assertEquals(numFeatures, rawDataset.getFeatureSource("mycollection").getFeatures().size());

    //cacheFS.resetDidRead();
    assertEquals(numFeatures, cacheDataset.getFeatures().size());
    //assertTrue(cacheFS.didRead());
View Full Code Here

     
      DataStore ds = new MemoryDataStore(mm);
      FeatureCache cache = new StreamingGridFeatureCache(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

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.