code: public GeometryCollection fromTransferObject(GeometryCollectionTo input, CrsId crsId) {
  
          if (input == null) { return null; }
          crsId = getCrsId(input, crsId);
          isValid(input);
  
          Geometry[] geoms = new Geometry[input.getGeometries().length];
          for (int i = 0; i < geoms.length; i++) {
              geoms[i] = fromTransferObject(input.getGeometries()[i], crsId);
          }
          return new GeometryCollection(geoms);
      }
docs: Creates a geometrycollection object starting from a transfer object.
  
  @param input the geometry collection transfer object
  @param crsId the crs id to use (ignores the crs of the input). If null, uses the crs of the input.
  @return the corresponding geometry
  @throws IllegalArgumentException If the geometry could not be constructed due to an invalid transfer object