Examples of FeatureVisitor


Examples of org.opengis.feature.FeatureVisitor

        final String[] properties = { "the_geom", "label" };
        final SimpleFeatureType featureType;
        featureType = getTypeView(featureName, schemaLocation, GEOS_ROADS.CRS, properties);

        final FeatureVisitor assertor = new FeatureAssertor(featureType);

        URL url = TestData.getResource(this, GEOS_ROADS.DATA);
        GetFeatureParser parser = getParser(featureName, schemaLocation, featureType, url);

        int nof = parser.getNumberOfFeatures();
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

        final String[] properties = { "the_geom", "label" };
        final SimpleFeatureType featureType;
        featureType = getTypeView(featureName, schemaLocation, GEOS_CURVE_ROADS.CRS, properties);

        final FeatureVisitor assertor = new FeatureAssertor(featureType);

        URL url = TestData.getResource(this, GEOS_CURVE_ROADS.DATA);
        GetFeatureParser parser = getParser(featureName, schemaLocation, featureType, url);

        int nof = parser.getNumberOfFeatures();
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

        final String[] properties = { "the_geom", "CNTRY_NAME", "POP_CLASS" };
        final SimpleFeatureType featureType;
        featureType = getTypeView(featureName, schemaLocation, GEOS_TASMANIA_CITIES.CRS, properties);

        final FeatureVisitor assertor = new FeatureAssertor(featureType);

        URL url = TestData.getResource(this, GEOS_TASMANIA_CITIES.DATA);
        GetFeatureParser parser = getParser(featureName, schemaLocation, featureType, url);

        int nof = parser.getNumberOfFeatures();
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

        final String[] properties = { "geometry", "instanceName", "instanceCode" };

        final SimpleFeatureType featureType = getTypeView(featureName, schemaLocation,
                CUBEWERX_GOVUNITCE.CRS, properties);

        final FeatureVisitor assertor = new FeatureAssertor(featureType);

        URL url = TestData.getResource(this, CUBEWERX_GOVUNITCE.DATA);
        GetFeatureParser parser = getParser(featureName, schemaLocation, featureType, url);
        int nof = parser.getNumberOfFeatures();
        assertEquals(-1, nof);
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

        final GetFeatureParser parser = getParser(featureName, schemaLocation, featureType, url);

        int nof = parser.getNumberOfFeatures();
        assertEquals(-1, nof);

        FeatureVisitor assertor = new FeatureAssertor(featureType);
        testParseGetFeatures(featureName, featureType, parser, assertor, 3);
    }
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

        final GetFeatureParser parser = getParser(featureName, schemaLocation, featureType, url);

        int nof = parser.getNumberOfFeatures();
        assertEquals(-1, nof);

        FeatureVisitor assertor = new FeatureAssertor(featureType);
        testParseGetFeatures(featureName, featureType, parser, assertor, 2);
    }
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

            andFil = ff.and(boundsCheck, polyCheck);
           
            try {
                fcResult = featureSource.getFeatures(andFil);
                // go through results and copy out the found features
                fcResult.accepts(new FeatureVisitor() {
                    public void visit(Feature feature) {
                        found.add((SimpleFeature) feature);
                    }
                }, null);
            } catch (IOException e1) {
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

        // load shapefile end (docs marker)

        final SpatialIndex index = new STRtree();
        FeatureCollection features = source.getFeatures();
        System.out.println("Slurping in features ...");
        features.accepts(new FeatureVisitor() {

            @Override
            public void visit(Feature feature) {
                SimpleFeature simpleFeature = (SimpleFeature) feature;
                Geometry geom = (MultiLineString) simpleFeature.getDefaultGeometry();
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

        final SimpleFeatureType schema = buildType.buildFeatureType();
        // Configure memory datastore
        final MemoryDataStore memory = new MemoryDataStore();
        memory.createSchema(schema);
       
        collection.accepts(new FeatureVisitor() {
            public void visit(Feature feature) {
                SimpleFeatureBuilder builder = new SimpleFeatureBuilder(schema);
               
                builder.init((SimpleFeature) feature);
                for (AttributeDescriptor descriptor : newTypes) {
View Full Code Here

Examples of org.opengis.feature.FeatureVisitor

    FilterFactory ff = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
    Filter filter = ff.id(Collections.singleton(ff.featureId("fred")));
    try {
        final Set<FeatureId> removed = new HashSet<FeatureId>();
        SimpleFeatureCollection collection = store.getFeatures( new Query( typeName, filter, Query.NO_NAMES ));
        collection.accepts( new FeatureVisitor(){
            public void visit(Feature feature) {
                removed.add( feature.getIdentifier() );
            }
        }, null );
        store.removeFeatures(filter);
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.