Package org.geotools.data.crs

Examples of org.geotools.data.crs.ReprojectFeatureResults


        } catch (Exception e) {
            throw new RuntimeException(
                    "Cannot decode EPSG:4326, the CRS subsystem must be badly broken...");
        }
        if (sourceCrs != null && !CRS.equalsIgnoreMetadata(wgs84, sourceCrs)) {
            return new ReprojectFeatureResults(featureSource.getFeatures(q), wgs84);
        }

        return featureSource.getFeatures(q);
    }
View Full Code Here


        }
        SimpleFeatureCollection features = featureSource.getFeatures(q);
        SimpleFeatureType schema = featureSource.getSchema();
        CoordinateReferenceSystem nativeCRS = schema.getCoordinateReferenceSystem();
        if (nativeCRS != null && !CRS.equalsIgnoreMetadata(wgs84, nativeCRS)) {
            features = new ReprojectFeatureResults(features, wgs84);
        }

        return features;
    }
View Full Code Here

        }
                //ensure reprojection occurs, do not trust query, use the wrapper 
                SimpleFeatureCollection fColl = null;//fSource.getFeatures(q);
                //FeatureCollection fColl=null;
                if ( reproject ) {
                  fColl=new ReprojectFeatureResults( fSource.getFeatures(q),mapContent.getCoordinateReferenceSystem() );
                } else
                  fColl=fSource.getFeatures(q);
               
                // encodes the current layer, using the defined style
                writer.writeFeatures(fColl, ftsList);
View Full Code Here

TOP

Related Classes of org.geotools.data.crs.ReprojectFeatureResults

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.