[FEA]: Implement Arrow PyCapsule Interface #1332
Labels
External
Issues filed by people outside the team
feature request
New feature or request
Needs Triage
Need team to review and classify
Is this a new feature, an improvement, or a change to existing functionality?
New Feature
How would you describe the priority of this feature request
Medium
Please provide a clear description of problem you would like to solve.
I have an interest in growing the GeoArrow ecosystem and making projects interoperable. I'm also developing lonboard, a Python library that uses GeoArrow with deck.gl for visualization of millions of geometries in a Jupyter notebook. I think that would complement cuspatial well, as cuspatial already uses GeoArrow and does not implement its own visualization.
Arrow recently made a PyCapsule Interface spec, where a consumer is able to call an
__arrow_c_stream__
method and construct a table without knowing anything about the producer. This feature request is for cuspatial to implement the PyCapsule spec. So as an example in lonboard, you could pass acuspatial.GeoDataFrame
intolonboard.viz
and it would just work because of the__arrow_c_stream__
method.Describe any alternatives you have considered
Right now it looks like
to_arrow
only exists on theGeoSeries
object but not theGeoDataFrame
object? Maybe a first approach is to implement #1288 and create the public dunder of__arrow_c_stream__
after that?I'm not sure how the interfacing with GPU memory works; I suppose
__arrow_c_stream__
could calltable.to_geoarrow_pyarrow()
and finish by calling the pyarrow__arrow_c_stream__
method?Additional context
See also the discussion and links in pyarrow: apache/arrow#39195 and GeoPandas geopandas/geopandas#3156
I don't have an NVIDIA GPU so I'm unable to test solutions :/
The text was updated successfully, but these errors were encountered: