Examples of forceSchemaCRS()


Examples of org.geotools.data.shapefile.ShapefileDataStore.forceSchemaCRS()

            FeatureStore store = (FeatureStore) shpDataStore.getFeatureSource();
            store.addFeatures(neo4jDataStore.getFeatureSource(layerName).getFeatures());
            tx.success();
    }
        if (crs != null)
            shpDataStore.forceSchemaCRS(crs);
        if (!file.exists()) {
            throw new Exception("Shapefile was not created: " + file);
        } else if (file.length() < 10) {
            throw new Exception("Shapefile was unexpectedly small, only " + file.length() + " bytes: " + file);
        }
View Full Code Here

Examples of org.geotools.data.shapefile.ShapefileDataStore.forceSchemaCRS()

                "Error in shapefile schema. It is possible you don't have a geometry set in the output.");
        }
       
        try {
            if(schema.getCoordinateReferenceSystem() != null)
                sfds.forceSchemaCRS(schema.getCoordinateReferenceSystem());
        } catch(Exception e) {
            LOGGER.log(Level.WARNING, "Could not properly create the .prj file", e);
        }

        return sfds;
View Full Code Here

Examples of org.geotools.data.shapefile.indexed.IndexedShapefileDataStore.forceSchemaCRS()

        }
        IndexedShapefileDataStore ids = new IndexedShapefileDataStore(file.toURI().toURL(), new URI("http://geonetwork.org"), false, false, IndexType.QIX, Charset.forName(Constants.ENCODING));
        CoordinateReferenceSystem crs = CRS.decode("EPSG:4326");

        if (crs != null) {
            ids.forceSchemaCRS(crs);
        }

        if (!file.exists()) {
            SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
            AttributeDescriptor geomDescriptor = new AttributeTypeBuilder().crs(DefaultGeographicCRS.WGS84).binding(MultiPolygon.class).buildDescriptor("the_geom");
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.