Examples of AbstractFeatureVisitor


Examples of org.geotools.feature.collection.AbstractFeatureVisitor

            for (Property prop: destProps) {
                destAttributes.add(prop.getName());
            }
           
            // Collecting granules
            originCollection.accepts( new AbstractFeatureVisitor(){
                public void visit( Feature feature ) {
                    if(feature instanceof SimpleFeature)
                    {
                            // get the feature
                            final SimpleFeature sourceFeature = (SimpleFeature) feature;
View Full Code Here

Examples of org.geotools.feature.collection.AbstractFeatureVisitor

        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

Examples of org.geotools.feature.collection.AbstractFeatureVisitor

            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

Examples of org.geotools.feature.collection.AbstractFeatureVisitor

            final DefaultProgressListener listener = new DefaultProgressListener();
            final ListFeatureCollection collection = new ListFeatureCollection(schema);
            // Getting attributes structure to be filled

            inputCollection.accepts(new AbstractFeatureVisitor() {
                public void visit(Feature feature) {
                    if (feature instanceof SimpleFeature) {
                        // get the feature
                        final SimpleFeature sourceFeature = (SimpleFeature) feature;
                        Collection<Property> props = sourceFeature.getProperties();
                        Name propName = null;
                        Object propValue = null;

                        // Assigning value to dest feature for matching attributes
                        Filter filter = null;
                        for (Property prop : props) {
                            propName = prop.getName();
                            if (
                            !propName.getLocalPart().equalsIgnoreCase("imageIndex")
                                    && !propName.getLocalPart().equalsIgnoreCase("the_geom")
                                    && !propName.getLocalPart().equalsIgnoreCase("location")) {
                                propValue = prop.getValue();
                                Filter updatedFilter = Utils.FF.equal(Utils.FF.property(propName),
                                        Utils.FF.literal(propValue), true);
                                if (filter == null) {
                                    filter = updatedFilter;
                                } else {
                                    filter = FF.and(filter, updatedFilter);
                                }
                            }
                        }
                        Query query = new Query();
                        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.