BoundaryFF extends FunctionBase1 { @Override public NodeValue exec(NodeValue v) { try { GeometryWrapper geometry = GeometryWrapper.extract(v); GeometryWrapper boundary = geometry.boundary(); return boundary.asNodeValue(); } catch (DatatypeFormatException ex) { throw new ExprEvalException(ex.getMessage(), ex); } }  @Override NodeValue exec(NodeValue v);  }
@Test public void testExec_CRS84() { NodeValue v = NodeValue.makeNode("POLYGON((30 40, 30 70, 90 70, 90 40, 30 40))", WKTDatatype.INSTANCE); BoundaryFF instance = new BoundaryFF(); NodeValue expResult = NodeValue.makeNode("LINESTRING(30 40, 30 70, 90 70, 90 40, 30 40)", WKTDatatype.INSTANCE); NodeValue result = instance.exec(v); assertEquals(expResult, result); }
@Test public void testExec_WGS84() { NodeValue v = NodeValue.makeNode("<http: BoundaryFF instance = new BoundaryFF(); NodeValue expResult = NodeValue.makeNode("<http: NodeValue result = instance.exec(v); assertEquals(expResult, result); }