Examples of SpatiaLiteDataStoreFactory


Examples of org.geotools.data.spatialite.SpatiaLiteDataStoreFactory

    @Override
    protected void write(FeatureCollectionResponse featureCollection, OutputStream output,
        Operation getFeature) throws IOException, ServiceException {

        SpatiaLiteDataStoreFactory dsFactory = new SpatiaLiteDataStoreFactory();
        if (!dsFactory.isAvailable()) {
            throw new ServiceException("SpatiaLite support not avaialable, ensure all required " +
                "native libraries are installed");
        }

        /**
         * base location to temporally store spatialite database `es
         */
        File dbFile = File.createTempFile("spatialite", ".db");

        Map dbParams = new HashMap();
        dbParams.put(SpatiaLiteDataStoreFactory.DBTYPE.key, "spatialite");
        dbParams.put(SpatiaLiteDataStoreFactory.DATABASE.key, dbFile.getAbsolutePath());

        DataStore dataStore = dsFactory.createDataStore(dbParams);
        try {
            for (FeatureCollection fc : featureCollection.getFeatures()) {

                SimpleFeatureType featureType = (SimpleFeatureType) fc.getSchema()
                        ;
View Full Code Here

Examples of org.geotools.data.spatialite.SpatiaLiteDataStoreFactory

        Assume.assumeTrue(!skipTests());
    }

    private static boolean skipTests() {
        if (SKIPPED == null) {
            if (!new SpatiaLiteDataStoreFactory().isAvailable()) {
                SKIPPED = true;
                System.out.println("Skipping spatialite tests, native libraries not installed");
            } else {
                SKIPPED = false;
            }
View Full Code Here

Examples of org.geotools.data.spatialite.SpatiaLiteDataStoreFactory

        Map dbParams = new HashMap();
        dbParams.put("dbtype", "spatialite");
        dbParams.put("database", dbFile.getAbsolutePath());

        return new SpatiaLiteDataStoreFactory().createDataStore(dbParams);
    }
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.