JtsGeometryConverter implements Converter<Geometry> { @Override public Geometry parse(String text) throws ConversionException { if (text.isEmpty()) { return null; } try { return new WKTReader().read(text); } catch (ParseException e) { throw new ConversionException("Could not parse geometry.", e); } }  @Override Class<? extends Geometry> getValueType(); @Override Geometry parse(String text); @Override String format(Geometry value); static void registerConverter();  }
@Test public void testParse() throws ConversionException { testParsing(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), }; testParsing(factory.createLineString(coordinates)); final LinearRing linearRing = factory.createLinearRing(coordinates); testParsing(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)}); testParsing(polygon); }