Examples of streamFeatureCollection()


Examples of org.geotools.geojson.feature.FeatureJSON.streamFeatureCollection()

    }
   
    static void benchmarkFeatureCollectionParse(File source) throws Exception {
        BufferedReader reader = new BufferedReader(new FileReader(source));
        FeatureJSON fjson = new FeatureJSON();
        FeatureIterator<SimpleFeature> it = fjson.streamFeatureCollection(reader);
        int count = 0;
       
        long t1 = System.currentTimeMillis();
        while(it.hasNext()) {
//            SimpleFeature f = it.next();
View Full Code Here

Examples of org.geotools.geojson.feature.FeatureJSON.streamFeatureCollection()

    public FeatureReader read(ImportData data, ImportTask item) throws IOException {
        final SimpleFeatureType featureType =
            (SimpleFeatureType) item.getMetadata().get(FeatureType.class);
        FeatureJSON json = new FeatureJSON();
        json.setFeatureType(featureType);
        final FeatureIterator it = json.streamFeatureCollection(file(data, item));

        return new FeatureReader() {

            @Override
            public FeatureType getFeatureType() {
View Full Code Here

Examples of org.geotools.geojson.feature.FeatureJSON.streamFeatureCollection()

        // bounds
        ReferencedEnvelope bounds = new ReferencedEnvelope(crs);

        FeatureJSON reader = new FeatureJSON();
        reader.setFeatureType(featureType);
        FeatureIterator<SimpleFeature> it = reader.streamFeatureCollection(file);
        while(it.hasNext()) {
            SimpleFeature f = it.next();
            bounds.include(f.getBounds());
        }
        ft.setNativeBoundingBox(bounds);
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.