Examples of MaxSimpleFeatureCollection


Examples of org.geotools.feature.collection.MaxSimpleFeatureCollection

        if (offset > 0 || !query.isMaxFeaturesUnlimited()) {
            long max = Long.MAX_VALUE;
            if (!query.isMaxFeaturesUnlimited()) {
                max = query.getMaxFeatures();
            }
            collection = new MaxSimpleFeatureCollection(collection, offset, max);
        }
        // step four - retyping
        // (It would be nice to do this earlier so as to not have all the baggage
        // of unneeded attributes)
        if (query.getPropertyNames() != Query.ALL_NAMES) {
View Full Code Here

Examples of org.geotools.feature.collection.MaxSimpleFeatureCollection

public class MaxFeaturesFeatureCollectionTest extends
    FeatureCollectionWrapperTestSupport {

    public void testSize() throws Exception {
        // in the common case it's as big as the max
        MaxSimpleFeatureCollection max = new MaxSimpleFeatureCollection(delegate, 2);
        assertEquals(2, max.size());

        // however if we skip much it's going to be just as big as the remainder
        max = new MaxSimpleFeatureCollection(delegate, delegate.size() - 1, 10);
        assertEquals(1, max.size());
       
        // and if we skip more than the size
        max = new MaxSimpleFeatureCollection(delegate, delegate.size() + 1, 10);
        assertEquals(0, max.size());
    }
View Full Code Here

Examples of org.geotools.feature.collection.MaxSimpleFeatureCollection

        max = new MaxSimpleFeatureCollection(delegate, delegate.size() + 1, 10);
        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.feature.collection.MaxSimpleFeatureCollection

            i.close();
        }
    }
   
    public void testIteratorSkipMax() throws Exception {
        MaxSimpleFeatureCollection max = new MaxSimpleFeatureCollection(delegate, delegate.size() - 1, 2);
        SimpleFeatureIterator i = max.features();
        try {
            assertTrue(i.hasNext());
            i.next();
            assertFalse(i.hasNext());
        } finally {
View Full Code Here

Examples of org.geotools.feature.collection.MaxSimpleFeatureCollection

            i.close();
        }
    }
   
    public void testIteratorSkipMoreSize() throws Exception {
        MaxSimpleFeatureCollection max = new MaxSimpleFeatureCollection(delegate, delegate.size() + 1, 2);
        SimpleFeatureIterator i = max.features();
        try {
            assertFalse(i.hasNext());
        } finally {
            i.close();           
        }
View Full Code Here

Examples of org.geotools.feature.collection.MaxSimpleFeatureCollection

        if (offset > 0 || !query.isMaxFeaturesUnlimited()) {
            long max = Long.MAX_VALUE;
            if (!query.isMaxFeaturesUnlimited()) {
                max = query.getMaxFeatures();
            }
            features = new MaxSimpleFeatureCollection(features, offset, max);
        }

        // step four - retyping
        // (It would be nice to do this earlier so as to not have all the baggage
        // of unneeded attributes)
View Full Code Here

Examples of org.geotools.feature.collection.MaxSimpleFeatureCollection

                fc = new SortedSimpleFeatureCollection(fc, sortBy);
            }
           
            //apply limit offset if necessary
            if (offset != null || maxFeatures != null) {
                fc = new MaxSimpleFeatureCollection(fc, offset == null ? 0 : offset,
                        maxFeatures == null ? Integer.MAX_VALUE : maxFeatures);
            }
           
            //apply reprojection
            return applyProjectionPolicies(targetCRS, fc);
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.