@Test public void testBuffer() throws Exception { URL url = TestData.getResource(TestData.class, "shapes/archsites.shp"); ShapefileDataStore store = new ShapefileDataStore(url); SimpleFeatureCollection features = store.getFeatureSource().getFeatures(); Function featuresParam = ff.function("parameter", ff .literal(BufferFeatureCollectionFactory.FEATURES.key)); Function bufferParam = ff.function("parameter", ff .literal(BufferFeatureCollectionFactory.BUFFER.key), ff.literal(1000)); Function buffer = ff.function("gt:BufferFeatureCollection", featuresParam, bufferParam); SimpleFeatureCollection buffered = (SimpleFeatureCollection) buffer.evaluate(features); assertEquals(features.size(), buffered.size()); GeometryDescriptor gd = buffered.getSchema().getGeometryDescriptor(); assertEquals(MultiPolygon.class, gd.getType().getBinding()); }
public <T> T evaluate(Object object, Class<T> context) { Object o = evaluate(object); return Converters.convert(o, context); }
ProcessFunction implements Function { public <T> T evaluate(Object object, Class<T> context) { Object o = evaluate(object); return Converters.convert(o, context); } }
ProcessFunction implements Function { public <T> T evaluate(Object object, Class<T> context) { Object o = evaluate(object); return Converters.convert(o, context); } ProcessFunction(String name, Name processName, List<Expression> inputExpressions,
            Map<String, Parameter<?>> parameters, Process process, Literal fallbackValue); }
ProcessFunction implements Function { public <T> T evaluate(Object object, Class<T> context) { Object o = evaluate(object); return Converters.convert(o, context); } ProcessFunction(String name, Name processName, List<Expression> inputExpressions,
            Map<String, Parameter<?>> parameters, Process process, Literal fallbackValue); Literal getFallbackValue(); String getName(); FunctionName getFunctionName(); List<Expression> getParameters(); Object accept(ExpressionVisitor visitor, Object extraData); T evaluate(Object object, Class<T> context); Object evaluate(Object object); }
ProcessFunction implements Function { public <T> T evaluate(Object object, Class<T> context) { Object o = evaluate(object); return Converters.convert(o, context); } ProcessFunction(String name, Name processName, List<Expression> inputExpressions,
            Map<String, Parameter<?>> parameters, Process process, Literal fallbackValue); Literal getFallbackValue(); String getName(); FunctionName getFunctionName(); List<Expression> getParameters(); Object accept(ExpressionVisitor visitor, Object extraData); T evaluate(Object object, Class<T> context); Object evaluate(Object object);  }