Skip to content

fix(geoarrow-pyarrow): Cast large and view as_geoarrow outputs - #84

Draft
paleolimbot wants to merge 2 commits into
geoarrow:mainfrom
paleolimbot:codex/as-geoarrow-storage-cast
Draft

paleolimbot wants to merge 2 commits into
geoarrow:mainfrom
paleolimbot:codex/as-geoarrow-storage-cast

Conversation

@paleolimbot

Copy link
Copy Markdown
Contributor

Explicit large/view WKB and WKT output requests currently fail because geoarrow-c cannot write these encodings. Convert through ordinary WKB/WKT, cast storage, and preserve input metadata and chunk boundaries, including zero-chunk arrays. Each intermediate chunk remains subject to 32-bit offset limits; view casts require PyArrow 18 or newer.

Adds 16 regression cases covering storage, values, nulls, metadata, chunking, empty inputs, and no-op conversions. Validation: 170 pyarrow tests, 294 types/pandas tests, and 45 pyarrow doctests passed.

import geoarrow.pyarrow as ga

for target in [ga.large_wkb(), ga.wkb_view()]:
    result = ga.as_geoarrow(["POINT (0 1)"], type=target)
    print(result.type.storage_type)
# large_binary
# binary_view

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant