-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hi, I'm adding this issue because Kyle kindly asked 😅
I tried to use geoarrow.rust.core
in combination with lonboard
to display some data.
It didn't work (geometry has mixed types), however the exception in stacktrace came from geoarrow-pyarrow
and geometry-c
underneath.
File for tests: monaco_nofilter_noclip_compact.zip
Stacktrace:
from geoarrow.rust.core import read_parquet
from lonboard import viz
table = read_parquet(osm_data_path)
viz(table)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[52], line 1
----> 1 viz(table)
File /mnt/ssd/dev/quackosm/.venv/lib/python3.10/site-packages/lonboard/_viz.py:150, in viz(data, scatterplot_kwargs, path_kwargs, polygon_kwargs, map_kwargs)
138 layers = [
139 create_layer_from_data_input(
140 item,
(...)
146 for i, item in enumerate(data)
147 ]
148 else:
149 layers = [
--> 150 create_layer_from_data_input(
151 data,
152 _viz_color=color_ordering[0],
153 scatterplot_kwargs=scatterplot_kwargs,
154 path_kwargs=path_kwargs,
155 polygon_kwargs=polygon_kwargs,
156 )
157 ]
159 map_kwargs = {} if not map_kwargs else map_kwargs
161 if "basemap_style" not in map_kwargs.keys():
File /mnt/ssd/dev/quackosm/.venv/lib/python3.10/site-packages/lonboard/_viz.py:204, in create_layer_from_data_input(data, **kwargs)
202 if hasattr(data, "__arrow_c_stream__"):
203 data = cast("ArrowStreamExportable", data)
--> 204 return _viz_geoarrow_table(pa.table(data), **kwargs)
206 # Anything with __geo_interface__
207 if hasattr(data, "__geo_interface__"):
File /mnt/ssd/dev/quackosm/.venv/lib/python3.10/site-packages/pyarrow/table.pxi:5221, in pyarrow.lib.table()
File /mnt/ssd/dev/quackosm/.venv/lib/python3.10/site-packages/pyarrow/ipc.pxi:880, in pyarrow.lib.RecordBatchReader._import_from_c_capsule()
File /mnt/ssd/dev/quackosm/.venv/lib/python3.10/site-packages/pyarrow/error.pxi:154, in pyarrow.lib.pyarrow_internal_check_status()
File /mnt/ssd/dev/quackosm/.venv/lib/python3.10/site-packages/pyarrow/error.pxi:88, in pyarrow.lib.check_status()
File /mnt/ssd/dev/quackosm/.venv/lib/python3.10/site-packages/geoarrow/pyarrow/_type.py:58, in GeometryExtensionType.__arrow_ext_deserialize__(cls, storage_type, serialized)
55 schema = lib.SchemaHolder()
56 storage_type._export_to_c(schema._addr())
---> 58 c_vector_type = lib.CVectorType.FromStorage(
59 schema, cls._extension_name.encode("UTF-8"), serialized
60 )
62 return cls(c_vector_type)
File src/geoarrow/c/_lib.pyx:496, in geoarrow.c._lib.CVectorType.FromStorage()
File src/geoarrow/c/_lib.pyx:375, in geoarrow.c._lib.CVectorType._move_from_ctype()
ValueError: Failed to initialize GeoArrowSchemaView: Expected valid list type for coord parent 1 for extension 'geoarrow.multipoint'
Metadata
Metadata
Assignees
Labels
No labels