Package org.geotools.data

Examples of org.geotools.data.CachingFeatureSource$CachingFeatureCollection


        if (prop == null) {
            prop = layer.getBlackboard().get(KEY);
        }
        if (prop instanceof Boolean && Boolean.TRUE.equals(prop)) {
            try {
                CachingFeatureSource cachingFeatureSource = (CachingFeatureSource) layer.getBlackboard().get("cache");
                if( cachingFeatureSource != null ){
                    return cachingFeatureSource;
                }               
                cachingFeatureSource = new CachingFeatureSource(resource);
                layer.getBlackboard().put("cache", cachingFeatureSource);
                return cachingFeatureSource;
            } catch (IOException e) {
                if ( ProjectPlugin.getPlugin().isDebugging()){
                    ProjectPlugin.getPlugin().log("Unable to cache "+resource+":"+e.getLocalizedMessage());
View Full Code Here


        FileDataStore store = FileDataStoreFinder.getDataStore(file);
        SimpleFeatureSource featureSource = store.getFeatureSource();
       
        // CachingFeatureSource is deprecated as experimental (not yet production ready)
        CachingFeatureSource cache = new CachingFeatureSource(featureSource);

        // Create a map content and add our shapefile to it
        MapContent map = new MapContent();
        map.setTitle("Using cached features");
        Style style = SLD.createSimpleStyle(featureSource.getSchema());
View Full Code Here

TOP

Related Classes of org.geotools.data.CachingFeatureSource$CachingFeatureCollection

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.