Package org.geoserver.wps.resource

Examples of org.geoserver.wps.resource.ShapefileResource


        File file = new File(directory, m_sFilename);

        try {
            ShapefileDataStore dataStore = new ShapefileDataStore(DataUtilities.fileToURL(file));
            dataStore.createSchema(m_FeatureType);
            manager.addResource(new ShapefileResource(dataStore, directory));
           
            return dataStore;
        } catch(Throwable t) {
            LOGGER.log(Level.SEVERE, "Could not create shapefile output ", t);
            IOUtils.delete(directory);
View Full Code Here


        if (shapeFile == null) {
            FileUtils.deleteDirectory(tempDir);
            throw new IOException("Could not find any file with .shp extension in the zip file");
        } else {
            ShapefileDataStore store = new ShapefileDataStore(DataUtilities.fileToURL(shapeFile));
            resources.addResource(new ShapefileResource(store, tempDir));
            return store.getFeatureSource().getFeatures();
        }

    }
View Full Code Here

        if (shapeFile == null) {
            FileUtils.deleteDirectory(tempDir);
            throw new IOException("Could not find any file with .shp extension in the zip file");
        } else {
            ShapefileDataStore store = new ShapefileDataStore(DataUtilities.fileToURL(shapeFile));
            resources.addResource(new ShapefileResource(store, tempDir));
            return store.getFeatureSource().getFeatures();
        }

    }
View Full Code Here

        File file = new File(directory, m_sFilename);

        try {
            ShapefileDataStore dataStore = new ShapefileDataStore(DataUtilities.fileToURL(file));
            dataStore.createSchema(m_FeatureType);
            manager.addResource(new ShapefileResource(dataStore, directory));
           
            return dataStore;
        } catch(Throwable t) {
            LOGGER.log(Level.SEVERE, "Could not create shapefile output ", t);
            IOUtils.delete(directory);
View Full Code Here

TOP

Related Classes of org.geoserver.wps.resource.ShapefileResource

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.