Package org.geotools.data.crs

Examples of org.geotools.data.crs.ForceCoordinateSystemFeatureResults


            if(crs != null) {
                // do we need to force the crs onto the collection?
                CoordinateReferenceSystem nativeCrs = fc.getSchema().getGeometryDescriptor().getCoordinateReferenceSystem();
                if(nativeCrs == null) {
                    // we need crs forcing
                    fc = new ForceCoordinateSystemFeatureResults(fc, crs, false);
                }
               
                // we assume the crs has a valid EPSG code
                Integer code = CRS.lookupEpsgCode(crs, false);
                if(code != null) {
View Full Code Here


        }
        CoordinateReferenceSystem nativeCRS = fc.getSchema().getGeometryDescriptor().getCoordinateReferenceSystem();
       
        if(nativeCRS == null) {
            if(declaredCRS != null) {
                fc =  new ForceCoordinateSystemFeatureResults(fc, declaredCRS);
                nativeCRS = declaredCRS;
            }
        } else if(srsHandling == ProjectionPolicy.FORCE_DECLARED && !nativeCRS.equals(declaredCRS)) {
            fc =  new ForceCoordinateSystemFeatureResults(fc, declaredCRS);
            nativeCRS = declaredCRS;
        } else if(srsHandling == ProjectionPolicy.REPROJECT_TO_DECLARED && targetCRS == null
                && !nativeCRS.equals(declaredCRS)) {
            fc = new ReprojectFeatureResults(fc,declaredCRS);
        }
View Full Code Here

    @Test
    public void testImportBuildings() throws Exception {
        FeatureTypeInfo ti = getCatalog().getFeatureTypeByName(getLayerId(SystemTestData.BUILDINGS));
        SimpleFeatureCollection rawSource = (SimpleFeatureCollection) ti.getFeatureSource(null,
                null).getFeatures();
        ForceCoordinateSystemFeatureResults forced = new ForceCoordinateSystemFeatureResults(
                rawSource, CRS.decode("EPSG:4326"));

        ImportProcess importer = new ImportProcess(getCatalog());
        String result = importer.execute(forced, null, SystemTestData.CITE_PREFIX, SystemTestData.CITE_PREFIX,
                "Buildings2", null, null, null);
View Full Code Here

            if(crs != null) {
                // do we need to force the crs onto the collection?
                CoordinateReferenceSystem nativeCrs = fc.getSchema().getGeometryDescriptor().getCoordinateReferenceSystem();
                if(nativeCrs == null) {
                    // we need crs forcing
                    fc = new ForceCoordinateSystemFeatureResults(fc, crs, false);
                }
               
                // we assume the crs has a valid EPSG code
                Integer code = CRS.lookupEpsgCode(crs, false);
                if(code != null) {
View Full Code Here

TOP

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

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.