diff --git a/ibis/expr/types/pretty.py b/ibis/expr/types/pretty.py index 78a47a4ebcc7..6f9f67943170 100644 --- a/ibis/expr/types/pretty.py +++ b/ibis/expr/types/pretty.py @@ -41,6 +41,13 @@ def _(dtype, values): return _format_nested([None if v is None else dict(v) for v in values]) +@format_values.register(dt.GeoSpatial) +def _(dtype, values): + import shapely + + return _format_nested([None if v is None else shapely.from_wkb(v) for v in values]) + + @format_values.register(dt.JSON) def _(dtype, values): def try_json(v): diff --git a/ibis/formats/pyarrow.py b/ibis/formats/pyarrow.py index 03b26d1391ff..a31b4afa7518 100644 --- a/ibis/formats/pyarrow.py +++ b/ibis/formats/pyarrow.py @@ -90,6 +90,7 @@ def __arrow_ext_scalar_class__(self): dt.Unknown: pa.string(), dt.MACADDR: pa.string(), dt.INET: pa.string(), + dt.GeoSpatial: pa.binary(), }