Package org.geotools.data

Examples of org.geotools.data.CollectionFeatureReader


            b.set(aname("intProperty"), new Integer(i));
            b.set(aname("geometry"), new GeometryFactory().createPoint(new Coordinate(i, i)));
            collection.add(b.buildFeature(null));
        }

        FeatureReader<SimpleFeatureType, SimpleFeature> reader = new CollectionFeatureReader((SimpleFeatureCollection)collection, collection.getSchema());
        featureStore.setFeatures(reader);

        SimpleFeatureCollection features = featureStore.getFeatures();
        assertEquals(3, features.size());
View Full Code Here


        fb.add("baloon");
        fb.add(1);
        SimpleFeature sf = fb.buildFeature("states_mini.11");
       
        // set the feature
        transformed.setFeatures(new CollectionFeatureReader(new SimpleFeature[] {sf}));
       
        // check it's there and it's the only one
        int size = STATES.getCount(Query.ALL);
        assertEquals(1, size);
       
View Full Code Here

        fb.add("baloon");
        fb.add(1);
        SimpleFeature sf = fb.buildFeature("states_mini.11");
       
        // set the feature
        transformed.setFeatures(new CollectionFeatureReader(new SimpleFeature[] {sf}));
       
        // check it's there
        int size = STATES.getCount(Query.ALL);
        assertEquals(1, size);
       
View Full Code Here

        fb.add(1);
        fb.add(1);
        SimpleFeature sf = fb.buildFeature("states_mini.11");
       
        // set the feature
        transformed.setFeatures(new CollectionFeatureReader(new SimpleFeature[] {sf}));
       
        // check it's there
        int size = STATES.getCount(Query.ALL);
        assertEquals(1, size);
       
View Full Code Here

  

    @Override
    protected FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader(String typeName) throws IOException {
  return new CollectionFeatureReader(Collections.EMPTY_LIST, FEATURE_TYPE);
    }
View Full Code Here

      }
  };
   
   
    private FeatureReader<SimpleFeatureType, SimpleFeature> wrapAndCache(List<SimpleFeature> features) {
  CollectionFeatureReader result = new CollectionFeatureReader(features, FEATURE_TYPE);
 
  return result;
    }
View Full Code Here

TOP

Related Classes of org.geotools.data.CollectionFeatureReader

Copyright © 2018 www.massapicom. 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.