Package org.geotools.data.simple

Examples of org.geotools.data.simple.SimpleFeatureCollection.accepts()


        ReferencedEnvelope requestedBBox=bboxExtractor.getBBox();
        final Geometry intersectionGeometry=requestedBBox!=null?JTS.toGeometry(requestedBBox):null;

        // visiting the features from the underlying store
        final DefaultProgressListener listener = new DefaultProgressListener();
        features.accepts(new AbstractFeatureVisitor() {
            public void visit(Feature feature) {
                if (feature instanceof SimpleFeature) {
                    // get the feature
                    final SimpleFeature sf = (SimpleFeature) feature;
                    GranuleDescriptor granule = null;
View Full Code Here


            if (LOGGER.isLoggable(Level.FINE))
                LOGGER.fine("Index Loaded");

            // visiting the features from the underlying store
            final DefaultProgressListener listener = new DefaultProgressListener();
            features.accepts(new AbstractFeatureVisitor() {
                public void visit(Feature feature) {
                    if (feature instanceof SimpleFeature) {
                        // get the feature
                        final SimpleFeature sf = (SimpleFeature) feature;
                        MultiLevelROI footprint = getGranuleFootprint(sf);
View Full Code Here

            if (fs instanceof ContentFeatureSource)
                ((ContentFeatureSource) fs).accepts(query, function, null);
            else {
                final SimpleFeatureCollection collection = fs.getFeatures(query);
                collection.accepts(function, null);

            }
        } finally {
            lock.unlock();
        }
View Full Code Here

            public void visit(Feature f) {
                SimpleFeature feature = (SimpleFeature) f;
                cache.put( feature.getID(), feature );
            }
        };
        readFeatures.accepts( cacheResults, null );
        assertEquals( "restored", list.size(), cache.size() );
        assertEquals( "hello world", cache.get("trip1").getAttribute("text"));
        assertEquals( "test if | chracter handling", cache.get("trip2").getAttribute("text"));
        assertEquals( "test of\n multi-line handling", cache.get("trip3").getAttribute("text"));
        assertEquals( "    test of\n whitespace handling", cache.get("trip4").getAttribute("text"));
View Full Code Here

        if (dd == null) {
            throw new ServiceException("Could not find dimension " + dimensionName
                    + " in coverage reader backing " + resource.prefixedName());
        }
        FeatureCalc calc = getFeatureCalcForStrategy(delegateStrategy, dd);
        fc.accepts(calc, null);
        Object result = calc.getResult().getValue();
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("Computed default value for " + dimensionName + " in layer "
                    + resource.prefixedName() + " using " + domainRestriction
                    + " to limit the domain resulted in value: " + result);
View Full Code Here

                        query.setFilter(filter);
                        SimpleFeatureCollection coverageCollection;
                        try {
                            coverageCollection = reader.getGranules(coverageName, readOnly)
                                    .getGranules(query);
                            coverageCollection.accepts(new AbstractFeatureVisitor() {
                                public void visit(Feature feature) {
                                    if (feature instanceof SimpleFeature) {
                                        // get the feature
                                        final SimpleFeature destFeature = DataUtilities
                                                .template(schema);
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.