Package org.geotools.data.simple

Examples of org.geotools.data.simple.SimpleFeatureCollection.features()


            iterator = features.features();
            final SimpleFeature feature1 = iterator.next();
            iterator.close();

            features = store.getFeatures(fid2Filter);
            iterator = features.features();
            final SimpleFeature feature2 = iterator.next();
            iterator.close();

            // Note that for tables that are ambiguous about what types of geometries
            // they store (as this table is), ArcSDE will "compress" a stored geometry
View Full Code Here


        SimpleFeature source;
        SimpleFeature dest;

        try {
            for (SimpleFeatureIterator fi = testFeatures.features(); fi.hasNext();) {
                source = fi.next();
                dest = writer.next();
                dest.setAttributes(source.getAttributes());
                writer.write();
            }
View Full Code Here

        SimpleFeature source;
        SimpleFeature dest;

        int count = 0;
        try {
            for (SimpleFeatureIterator fi = testFeatures.features(); fi.hasNext(); count++) {
                if (count < initialCount) {
                    assertTrue("at index " + count, writer.hasNext());
                } else {
                    assertFalse("at index " + count, writer.hasNext());
                }
View Full Code Here

                typeName, Transaction.AUTO_COMMIT);

        SimpleFeature source;
        SimpleFeature dest;

        for (SimpleFeatureIterator fi = testFeatures.features(); fi.hasNext();) {
            assertFalse(writer.hasNext());
            source = fi.next();
            dest = writer.next();
            dest.setAttributes(source.getAttributes());
            writer.write();
View Full Code Here

        assertEquals(1, s.getTypeNames().length);
        SimpleFeatureCollection fc = s.getFeatureSource("junk").getFeatures();
        assertEquals(features.size(), fc.size());
        // Read
        int c = 0;
        SimpleFeatureIterator it = fc.features();
        try {
            while (it.hasNext()) {
                SimpleFeature f = it.next();
                assertNotNull(f);
                assertNotNull(f.getDefaultGeometry());
View Full Code Here

        });
        SimpleFeatureCollection fc = s.getFeatureSource("junk").getFeatures(query);
        assertEquals(features.size(), fc.size());
        // Read
        int c = 0;
        SimpleFeatureIterator it = fc.features();
        try {
            while (it.hasNext()) {
                SimpleFeature f = it.next();
                assertNotNull(f);
                assertNotNull(f.getDefaultGeometry());
View Full Code Here

        assertEquals(1, s.getTypeNames().length);
        SimpleFeatureCollection fc = s.getFeatureSource("points").getFeatures();
        assertEquals(features.size(), fc.size());
        // Read
        int c = 0;
        SimpleFeatureIterator it = fc.features();
        try {
            while(it.hasNext()) {
                SimpleFeature f = it.next();
                assertNotNull(f);
                assertNotNull(f.getDefaultGeometry());
View Full Code Here

        Query query = new Query(InProcessViewSupportTestData.typeName, Filter.INCLUDE, Query.ALL_PROPERTIES);
        SimpleFeatureCollection fc = fs.getFeatures(query);
        int fcCount = fc.size();
        int itCount = 0;
        final int expectedCount = 7;
        SimpleFeatureIterator it = fc.features();
        try {
            while (it.hasNext()) {
                SimpleFeature f = (SimpleFeature) it.next();
                assertNotNull(f);
                itCount++;
View Full Code Here

        SimpleFeatureSource fs = store.getFeatureSource(InProcessViewSupportTestData.typeName);
        SimpleFeatureCollection fc = fs.getFeatures(query);
        int fcCount = fc.size();
        int itCount = 0;
        final int expectedCount = 3;
        SimpleFeatureIterator it = fc.features();
        try {
            while (it.hasNext()) {
                SimpleFeature f = it.next();
                assertNotNull(f);
                itCount++;
View Full Code Here

            public void run() {
                try {
                    System.err.println("worker2 calling getFeartures()");
                    SimpleFeatureCollection collection = fStore.getFeatures();
                    System.err.println("worker2 opening iterator...");
                    SimpleFeatureIterator features = collection.features();
                    try {
                        System.err.println("worker2 iterating...");
                        while (features.hasNext()) {
                            SimpleFeature next = features.next();
                            System.out.println("**Got feature " + next.getID());
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.