code: public DBObject toDBObject() {
          final BasicDBList list = new BasicDBList();
          for (final Point point : points) {
              list.add(point.toDBObject());
          }
  
          return new BasicDBObject(geometry, list);
      }
docs: Creates a DBObject from this Shape
  
  @return the DBObject