presto-geospatial-toolkit/src/main/java/io/prestosql/geospatial/serde/JtsGeometrySerde.java/JtsGeometrySerde/deserialize
class JtsGeometrySerde:    public static Geometry deserialize(Slice shape)
    {
        requireNonNull(shape, "shape is null");
        BasicSliceInput input = shape.getInput();
        verify(input.available() > 0);
        GeometrySerializationType type = GeometrySerializationType.getForCode(input.readByte());
        return readGeometry(input, type);
    }