// MARSHALL: server-to-client serialization
// -------------------------------------------------------------------------
public Object marshall(SerializerState state, Object o) throws MarshallException {
Geometry geometry = (Geometry) o;
JSONObject json = null;
if (geometry.getGeometryType().equals(Geometry.POINT)) {
json = serializePoint(geometry);
} else if (geometry.getGeometryType().equals(Geometry.LINE_STRING)) {
json = serializeLineString(geometry);
} else if (geometry.getGeometryType().equals(Geometry.LINEAR_RING)) {