JtsGeometryConverter implements Converter<Geometry> { @Override public String format(Geometry value) { if (value == null) { return ""; } return new WKTWriter().write(value); }  @Override Class<? extends Geometry> getValueType(); @Override Geometry parse(String text); @Override String format(Geometry value); static void registerConverter();  }
@Test public void testFormat() throws ConversionException, ParseException { testFormatting(factory.createPoint(new Coordinate(12.4567890, 0.00000001))); final Coordinate[] coordinates = new Coordinate[]{ new Coordinate(2, 0), new Coordinate(6, 0), new Coordinate(8, 3), new Coordinate(8, 9), new Coordinate(6, 11), new Coordinate(2, 9), new Coordinate(2, 0), }; final LinearRing linearRing = factory.createLinearRing(coordinates); testFormatting(linearRing); final Coordinate[] hole = new Coordinate[]{ new Coordinate(4, 4), new Coordinate(5, 4), new Coordinate(5, 6), new Coordinate(4, 6), new Coordinate(4, 4), }; final Polygon polygon = factory.createPolygon(linearRing, new LinearRing[]{factory.createLinearRing(hole)}); testFormatting(polygon); assertEquals("", converter.format(null)); }