Package org.geotools.feature.collection

Examples of org.geotools.feature.collection.SortedSimpleFeatureCollection


public abstract class SimpleProcessingCollection extends
        ProcessingCollection<SimpleFeatureType, SimpleFeature> implements SimpleFeatureCollection {

    @Override
    public SimpleFeatureCollection sort(SortBy order) {
        return new SortedSimpleFeatureCollection(this, new SortBy[] { order });
    }
View Full Code Here


public class SortedFeatureCollectionTest extends FeatureCollectionWrapperTestSupport {

    FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);

    public void testNaturalSort() throws Exception {
        SortedSimpleFeatureCollection sorted = new SortedSimpleFeatureCollection(delegate,
                new SortBy[] { SortBy.NATURAL_ORDER });
        checkSorted(sorted, DataUtilities.sortComparator(SortBy.NATURAL_ORDER));
    }
View Full Code Here

                new SortBy[] { SortBy.NATURAL_ORDER });
        checkSorted(sorted, DataUtilities.sortComparator(SortBy.NATURAL_ORDER));
    }

    public void testReverseSort() throws Exception {
        SortedSimpleFeatureCollection sorted = new SortedSimpleFeatureCollection(delegate,
                new SortBy[] { SortBy.REVERSE_ORDER });
        checkSorted(sorted, DataUtilities.sortComparator(SortBy.REVERSE_ORDER));
    }
View Full Code Here

        checkSorted(sorted, DataUtilities.sortComparator(SortBy.REVERSE_ORDER));
    }

    public void testSortAttribute() throws Exception {
        SortBy sort = ff.sort("someAtt", SortOrder.ASCENDING);
        SortedSimpleFeatureCollection sorted = new SortedSimpleFeatureCollection(delegate,
                new SortBy[] { sort });
        checkSorted(sorted, DataUtilities.sortComparator(sort));
    }
View Full Code Here

            //this is the raw "unprojected" feature collection
            SimpleFeatureCollection fc = source.getFeatures(newQuery);
           
            // apply sorting if necessary
            if(sortBy != null) {
                fc = new SortedSimpleFeatureCollection(fc, sortBy);
            }
           
            //apply limit offset if necessary
            if (offset != null || maxFeatures != null) {
                fc = new MaxSimpleFeatureCollection(fc, offset == null ? 0 : offset,
View Full Code Here

TOP

Related Classes of org.geotools.feature.collection.SortedSimpleFeatureCollection

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.