Package org.geotools.process.vector

Examples of org.geotools.process.vector.CentroidProcess$CentroidFeatureCollection


        fc.add(fb.buildFeature(null));
    }
   
    @Test
    public void testSchema() {
        CentroidProcess cp = new CentroidProcess();
        SimpleFeatureCollection result = cp.execute(fc);
        SimpleFeatureType ft = result.getSchema();
        assertEquals(2, ft.getAttributeCount());
        assertEquals(Point.class, ft.getGeometryDescriptor().getType().getBinding());
        assertEquals(String.class, ft.getDescriptor("name").getType().getBinding());
    }
View Full Code Here


    }

   
    @Test
    public void testResults() throws Exception {
        CentroidProcess cp = new CentroidProcess();
        SimpleFeatureCollection result = cp.execute(fc);

        SimpleFeatureIterator it = result.features();
        assertTrue(it.hasNext());
        SimpleFeature f = it.next();
        assertEquals(0, ((Point) f.getDefaultGeometry()).getX(), 1e-6);
View Full Code Here

TOP

Related Classes of org.geotools.process.vector.CentroidProcess$CentroidFeatureCollection

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.