Examples of modifyFeatures()


Examples of org.geotools.data.simple.SimpleFeatureStore.modifyFeatures()

        store = (SimpleFeatureStore) rts.getFeatureSource(RENAMED);
        SimpleFeature original = store.getFeatures(fidFilter).features().next();

        // test a non mapped attribute
        String newDescription = ((String) original.getAttribute("description")) + " xxx";
        store.modifyFeatures(original.getFeatureType().getDescriptor("description"), newDescription,
                fidFilter);
        SimpleFeature modified = store.getFeatures(fidFilter).features().next();
        assertEquals(newDescription, modified.getAttribute("description"));
       
        // test a mapped attribute
View Full Code Here

Examples of org.geotools.data.simple.SimpleFeatureStore.modifyFeatures()

        assertEquals(newDescription, modified.getAttribute("description"));
       
        // test a mapped attribute
        MultiPoint mpo = (MultiPoint) original.getAttribute("pointProperty");
        MultiPoint mpm = mpo.getFactory().createMultiPoint(new Coordinate[] {new Coordinate(10, 12)});
        store.modifyFeatures(original.getFeatureType().getDescriptor("pointProperty"), mpm,
                fidFilter);
        modified = store.getFeatures(fidFilter).features().next();
        assertTrue(mpm.equalsExact((Geometry) modified.getAttribute("pointProperty")));
    }
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.