presto-geospatial/src/main/java/io/prestosql/plugin/geospatial/EncodedPolylineFunctions.java/EncodedPolylineFunctions/encodePolyline
class EncodedPolylineFunctions:    private static Slice encodePolyline(MultiVertexGeometry multiVertexGeometry)
    {
        long lastLatitude = 0;
        long lastLongitude = 0;

        DynamicSliceOutput output = new DynamicSliceOutput(0);

        for (int i = 0; i < multiVertexGeometry.getPointCount(); i++) {
            Point point = multiVertexGeometry.getPoint(i);

            long latitude = Math.round(point.getY() * 1e5);
            long longitude = Math.round(point.getX() * 1e5);

            long latitudeDelta = latitude - lastLatitude;
            long longitudeDelta = longitude - lastLongitude;

            encode(latitudeDelta, output);
            encode(longitudeDelta, output);

            lastLatitude = latitude;
            lastLongitude = longitude;
        }
        return output.slice();
    }