Skip to content

[FEA]: Implement Arrow PyCapsule Interface #1332

Open
@kylebarron

Description

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 a cuspatial.GeoDataFrame into lonboard.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 the GeoSeries object but not the GeoDataFrame 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 call table.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 :/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    ExternalIssues filed by people outside the teamNeeds TriageNeed team to review and classifyfeature requestNew feature or request

    Type

    No type

    Projects

    • Status

      Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions