Skip to content

Commit

Permalink
fix(geospatial): pretty print data in interactive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and gforsyth committed Dec 5, 2023
1 parent 724859d commit afb04ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ibis/expr/types/pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 1 addition & 0 deletions ibis/formats/pyarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}


Expand Down

0 comments on commit afb04ed

Please sign in to comment.