public class GeometryAdapter extends XmlAdapter<String,Geometry> {
public Geometry unmarshal(String val) throws Exception {
return new WKTReader(GeometryUtils.getGeometryFactory()).read(val);
}
public String marshal(Geometry val) throws Exception {
GMLWriter writer = new GMLWriter();
writer.setNamespace(false);
return writer.write(val);
}