@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()); }
@DescribeResult(name = "result", description = "Centroids of input features") public SimpleFeatureCollection execute( @DescribeParameter(name = "features", description = "Input feature collection") SimpleFeatureCollection features) throws ProcessException { return DataUtilities.simple(new CentroidFeatureCollection(features)); }
CentroidProcess implements VectorProcess { @DescribeResult(name = "result", description = "Centroids of input features") public SimpleFeatureCollection execute( @DescribeParameter(name = "features", description = "Input feature collection") SimpleFeatureCollection features) throws ProcessException { return DataUtilities.simple(new CentroidFeatureCollection(features)); } }
CentroidProcess implements VectorProcess { @DescribeResult(name = "result", description = "Centroids of input features") public SimpleFeatureCollection execute( @DescribeParameter(name = "features", description = "Input feature collection") SimpleFeatureCollection features) throws ProcessException { return DataUtilities.simple(new CentroidFeatureCollection(features)); }  }
CentroidProcess implements VectorProcess { @DescribeResult(name = "result", description = "Centroids of input features") public SimpleFeatureCollection execute( @DescribeParameter(name = "features", description = "Input feature collection") SimpleFeatureCollection features) throws ProcessException { return DataUtilities.simple(new CentroidFeatureCollection(features)); }  @DescribeResult(name = "result", description = "Centroids of input features") SimpleFeatureCollection execute(
            @DescribeParameter(name = "features", description = "Input feature collection")
                    SimpleFeatureCollection features); }
CentroidProcess implements VectorProcess { @DescribeResult(name = "result", description = "Centroids of input features") public SimpleFeatureCollection execute( @DescribeParameter(name = "features", description = "Input feature collection") SimpleFeatureCollection features) throws ProcessException { return DataUtilities.simple(new CentroidFeatureCollection(features)); }  @DescribeResult(name = "result", description = "Centroids of input features") SimpleFeatureCollection execute(
            @DescribeParameter(name = "features", description = "Input feature collection")
                    SimpleFeatureCollection features);  }