Examples of features()


Examples of org.geotools.feature.FeatureCollection.features()

        FeatureTypeInfo fti = getCatalog().getFeatureTypeByName(MockData.LINES.getLocalPart());
        assertEquals("EPSG:3004", fti.getSRS());
        assertEquals(ProjectionPolicy.NONE, fti.getProjectionPolicy());
        FeatureCollection fc = fti.getFeatureSource(null, null).getFeatures();
        assertEquals(CRS.decode("EPSG:32615"), fc.getSchema().getCoordinateReferenceSystem());
        FeatureIterator fi = fc.features();
        Feature f = fi.next();
        fi.close();
        assertEquals(CRS.decode("EPSG:32615"), f.getType().getCoordinateReferenceSystem());
    }
}
View Full Code Here

Examples of org.geotools.feature.FeatureCollection.features()

            query.setStartIndex(offset);
            if (limit != null && limit.intValue() > 0) {
                query.setMaxFeatures(limit);
            }
            FeatureCollection collection = source.getFeatures(query);
            FeatureIterator features = collection.features();
            Iterator<Feature> fiterator = new FeatureIteratorIterator<Feature>(features);

            Iterator<RevObject> objects = Iterators.transform(fiterator,
                    new Function<Feature, RevObject>() {
                        @Override
View Full Code Here

Examples of org.geotools.feature.collection.MaxSimpleFeatureCollection.features()

        assertEquals(0, max.size());
    }

    public void testIteratorMax() throws Exception {
        MaxSimpleFeatureCollection max = new MaxSimpleFeatureCollection(delegate, 2);
        SimpleFeatureIterator i = max.features();
        try {
            for (int x = 0; x < 2; x++) {
                assertTrue(i.hasNext());
                i.next();
            }
View Full Code Here

Examples of org.geotools.geopkg.GeoPackage.features()

        assertPathExists(root, "data/bar.gpkg");

        // ensure the geopackage has the right data in it
        GeoPackage gpkg = new GeoPackage(root.resolve("data/bar.gpkg").toFile());
        try {
            assertEquals(2, gpkg.features().size());
            assertNotNull(gpkg.feature("stuff"));
            assertNotNull(gpkg.feature("widgets"));
        }
        finally {
            gpkg.close();
View Full Code Here

Examples of org.locationtech.geogig.api.RevTree.features()

        protected Iterator<Node> resolveBucketEntries(ObjectId bucketId) {
            RevTree bucketTree = source.getTree(bucketId);
            if (bucketTree.buckets().isPresent()) {
                return new FeatureBuckets(bucketTree);
            }
            if (bucketTree.features().isPresent()) {
                return new Features(bucketTree);
            }
            return Iterators.emptyIterator();
        }
    }
View Full Code Here

Examples of org.locationtech.geogig.api.RevTree.features()

            }
        }
        RevTree changed = builder.build();
        assertEquals(RevTree.NORMALIZED_SIZE_LIMIT, changed.size());
        // sanity check
        assertTrue(changed.features().isPresent());
        assertFalse(changed.buckets().isPresent());

        final long expected = deepTree.size() - changed.size();

        assertEquals(expected, count(deepTree, changed).featureCount());
View Full Code Here

Examples of org.netmelody.cieye.core.domain.Landscape.features()

        if (targetId.id() == null || targetId.id().isEmpty()) {
            return;
        }

        final Landscape landscape = landscapeFetcher.landscapeNamed(landscapeName);
        for (Feature feature : landscape.features()) {
            if (spyIntermediary.passNoteOn(feature, targetId, note)) {
                return;
            }
            LOG.error("Failed to handle request to note target " + targetId.id());
        }
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.