Examples of ReprojectingFeatureCollection


Examples of org.geoserver.feature.ReprojectingFeatureCollection

                        query.setFilter(ff.and(original, bbox));

                        // query and eventually reproject
                        features = source.getFeatures(query);
                        if(sourceCRS != null && !CRS.equalsIgnoreMetadata(wgs84, sourceCRS)) {
                            ReprojectingFeatureCollection coll = new ReprojectingFeatureCollection(features, wgs84);
                            coll.setDefaultSource(sourceCRS);
                            features = coll;
                        }
                       
                        if (features == null)
                            throw new NullPointerException();
View Full Code Here

Examples of org.geoserver.feature.ReprojectingFeatureCollection

                    // reprojection
                    final GeometryDescriptor defaultGeometry = store.getSchema().getGeometryDescriptor();
                    if(defaultGeometry != null) {
                        CoordinateReferenceSystem target = defaultGeometry.getCoordinateReferenceSystem();
                        if (target != null) {
                            collection = new ReprojectingFeatureCollection(collection, target);
                        }
                    }
                   
                    // Need to use the namespace here for the
                    // lookup, due to our weird
View Full Code Here

Examples of org.geoserver.feature.ReprojectingFeatureCollection

                        query.setFilter(ff.and(original, bbox));

                        // query and eventually reproject
                        features = source.getFeatures(query);
                        if(sourceCRS != null && !CRS.equalsIgnoreMetadata(wgs84, sourceCRS)) {
                            ReprojectingFeatureCollection coll = new ReprojectingFeatureCollection(features, wgs84);
                            coll.setDefaultSource(sourceCRS);
                            features = coll;
                        }
                       
                        if (features == null)
                            throw new NullPointerException();
View Full Code Here

Examples of org.geoserver.feature.ReprojectingFeatureCollection

                    // reprojection
                    final GeometryDescriptor defaultGeometry = store.getSchema().getGeometryDescriptor();
                    if(defaultGeometry != null) {
                        CoordinateReferenceSystem target = defaultGeometry.getCoordinateReferenceSystem();
                        if (target != null) {
                            collection = new ReprojectingFeatureCollection(collection, target);
                        }
                    }
                   
                    // Need to use the namespace here for the
                    // lookup, due to our weird
View Full Code Here

Examples of org.geoserver.feature.ReprojectingFeatureCollection

                    // reprojection
                    final GeometryDescriptor defaultGeometry = store.getSchema().getGeometryDescriptor();
                    if(defaultGeometry != null) {
                        CoordinateReferenceSystem target = defaultGeometry.getCoordinateReferenceSystem();
                        if (target != null) {
                            collection = new ReprojectingFeatureCollection(collection, target);
                        }
                    }
                   
                    // Need to use the namespace here for the
                    // lookup, due to our weird
View Full Code Here

Examples of org.geoserver.feature.ReprojectingFeatureCollection

                        query.setFilter(ff.and(original, bbox));

                        // query and eventually reproject
                        features = source.getFeatures(query);
                        if(sourceCRS != null && !CRS.equalsIgnoreMetadata(wgs84, sourceCRS)) {
                            ReprojectingFeatureCollection coll = new ReprojectingFeatureCollection(features, wgs84);
                            coll.setDefaultSource(sourceCRS);
                            features = coll;
                        }
                       
                        if (features == null)
                            throw new NullPointerException();
View Full Code Here

Examples of org.geotools.data.store.ReprojectingFeatureCollection

    public Object evaluate(Object object) {
        String targetCRS = getAttribute(object, 0, String.class, true);
        try {
            CoordinateReferenceSystem crs = CRS.decode(targetCRS);
           
            return new ReprojectingFeatureCollection((SimpleFeatureCollection) object, crs);
        } catch (Exception e) {
            throw new RuntimeException("Failed to reproject the collection");
        }
    }
View Full Code Here

Examples of org.geotools.data.store.ReprojectingFeatureCollection

        } else {
            collection = contents.subCollection(query.getFilter());
        }
        // step two: reproject
        if (query.getCoordinateSystemReproject() != null) {
            collection = new ReprojectingFeatureCollection(collection, query
                    .getCoordinateSystemReproject());
        }
        // step two sort! (note this makes a sorted copy)
        if (query.getSortBy() != null && query.getSortBy().length != 0) {
            SimpleFeature array[] = collection.toArray(new SimpleFeature[collection.size()]);
View Full Code Here

Examples of org.geotools.data.store.ReprojectingFeatureCollection

            features = new ForceCoordinateSystemFeatureResults(features, forcedCRS, false);
        }
        if (targetCRS != null) {
            // note, using ReprojectFeatureResults would work. However that would
            // just work by accident... see GEOS-4072
            features = new ReprojectingFeatureCollection(features, targetCRS);
        }
        return features;
    }
View Full Code Here

Examples of org.geotools.data.store.ReprojectingFeatureCollection

        if (query.getFilter() != null && query.getFilter() != Filter.INCLUDE) {
            features = new FilteringSimpleFeatureCollection(features, query.getFilter());
        }
        // step two: reproject
        if (query.getCoordinateSystemReproject() != null) {
            features = new ReprojectingFeatureCollection(features, query
                    .getCoordinateSystemReproject());
        }
        // step two sort! (note this makes a sorted copy)
        if (query.getSortBy() != null && query.getSortBy().length != 0) {
            SimpleFeature array[] = features.toArray(new SimpleFeature[features.size()]);
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.