static Geometry reassemblePolygons(List<List<CoordinateSequence>> groups) throws GeometryException {
    int numGeoms = groups.size();
    if (numGeoms == 1) {
      return reassemblePolygon(groups.getFirst());
    } else {
      Polygon[] polygons = new Polygon[numGeoms];
      for (int i = 0; i < numGeoms; i++) {
        polygons[i] = reassemblePolygon(groups.get(i));
      }
      return GeoUtils.JTS_FACTORY.createMultiPolygon(polygons);
    }
  }
Returns a {@link Polygon} or {@link MultiPolygon} from all groups of exterior/interior rings in {@code groups}.

@param groups a list of polygons where the first element in each inner list is the exterior ring and subsequent
              elements are inner rings.
@return the {@link Polygon} or {@link MultiPolygon}
@throws GeometryException if rings are not closed or have too few points
planetiler-core/src/main/java/com/onthegomap/planetiler/render/GeometryCoordinateSequences.java