presto-geospatial-toolkit/src/main/java/io/prestosql/geospatial/serde/JtsGeometrySerde.java/JtsGeometrySerde/readGeometryCollection
class JtsGeometrySerde:    private static Geometry readGeometryCollection(BasicSliceInput input)
    {
        List<Geometry> geometries = new ArrayList<>();
        while (input.available() > 0) {
            // skip length
            input.readInt();
            GeometrySerializationType type = GeometrySerializationType.getForCode(input.readByte());
            geometries.add(readGeometry(input, type));
        }
        return GEOMETRY_FACTORY.createGeometryCollection(geometries.toArray(new Geometry[0]));
    }