code: public static void toGeojsonPolygon(Polygon polygon, StringBuilder sb) {
          sb.append("{\"type\":\"Polygon\",\"coordinates\":[");
          //Process exterior ring
          toGeojsonCoordinates(polygon.getExteriorRing().getCoordinates(), sb);
          //Process interior rings
          for (int i = 0; i < polygon.getNumInteriorRing(); i++) {
              sb.append(",");
              toGeojsonCoordinates(polygon.getInteriorRingN(i).getCoordinates(), sb);
          }
          sb.append("]}");
      }
docs: Coordinates of a Polygon are an array of LinearRing coordinate arrays.
  The first element in the array represents the exterior ring. Any
  subsequent elements represent interior rings (or holes).
  
  Syntax:
  
  No holes:
  
  { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0],
  [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }
  
  With holes:
  
  { "type": "Polygon", "coordinates": [ [ [100.0, 0.0], [101.0, 0.0],
  [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.2, 0.2], [100.8, 0.2],
  [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ] ] }
  
  
  @param polygon
  @param sb