presto-geospatial-toolkit/src/main/java/io/prestosql/geospatial/serde/GeometrySerde.java/GeometrySerde/writePoint
class GeometrySerde:    private static void writePoint(DynamicSliceOutput output, OGCGeometry geometry)
    {
        Geometry esriGeometry = geometry.getEsriGeometry();
        verify(esriGeometry instanceof Point, "geometry is expected to be an instance of Point");
        Point point = (Point) esriGeometry;
        verify(!point.hasAttribute(VertexDescription.Semantics.Z) &&
                        !point.hasAttribute(VertexDescription.Semantics.M) &&
                        !point.hasAttribute(VertexDescription.Semantics.ID),
                "Only 2D points with no ID nor M attribute are supported");
        output.appendByte(GeometrySerializationType.POINT.code());
        if (!point.isEmpty()) {
            output.appendDouble(point.getX());
            output.appendDouble(point.getY());
        }
        else {
            output.appendDouble(NaN);
            output.appendDouble(NaN);
        }
    }