code: public static String toGeojson(Geometry geom) {
          StringBuilder sb = new StringBuilder();
          toGeojsonGeometry(geom, sb);
          return sb.toString();
      }
docs: Convert the geometry to a GeoJSON representation.
  
  @param geom
  @return