@Test public void testToWKTWithTargetClass() { FilterFactoryImpl ff = new FilterFactoryImpl(); Envelope envelope = new Envelope(10, 10, 20, 20); Function toWKT = ff.function("toWKT", ff.property(".")); String result = (String) toWKT.evaluate(envelope); assertEquals(result, "POLYGON ((10 20, 10 20, 10 20, 10 20, 10 20))"); }
public Object evaluate(Object feature) { Geometry arg0; try { arg0 = getExpression(0).evaluate(feature, Geometry.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function toWKT argument #0 - expected type Geometry"); } return (StaticGeometry.toWKT(arg0)); }
FilterFunction_toWKT extends FunctionExpressionImpl { public Object evaluate(Object feature) { Geometry arg0; try { arg0 = getExpression(0).evaluate(feature, Geometry.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function toWKT argument #0 - expected type Geometry"); } return (StaticGeometry.toWKT(arg0)); } }
FilterFunction_toWKT extends FunctionExpressionImpl { public Object evaluate(Object feature) { Geometry arg0; try { arg0 = getExpression(0).evaluate(feature, Geometry.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function toWKT argument #0 - expected type Geometry"); } return (StaticGeometry.toWKT(arg0)); } FilterFunction_toWKT(); }
FilterFunction_toWKT extends FunctionExpressionImpl { public Object evaluate(Object feature) { Geometry arg0; try { arg0 = getExpression(0).evaluate(feature, Geometry.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function toWKT argument #0 - expected type Geometry"); } return (StaticGeometry.toWKT(arg0)); } FilterFunction_toWKT(); Object evaluate(Object feature); }
FilterFunction_toWKT extends FunctionExpressionImpl { public Object evaluate(Object feature) { Geometry arg0; try { arg0 = getExpression(0).evaluate(feature, Geometry.class); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function toWKT argument #0 - expected type Geometry"); } return (StaticGeometry.toWKT(arg0)); } FilterFunction_toWKT(); Object evaluate(Object feature); static FunctionName NAME; }