Skip to content

Return an error instead of panicking on unsupported CRS in icebergCRSToGeoArrowMetadata #1232

Description

@laskoviymishka

Follow-up to #1138.

icebergCRSToGeoArrowMetadata panics on an unsupported (projjson) CRS, while the symmetric read function geoArrowCRSToIcebergCRS returns a clean error for the same case. It only works today because iceberg.Visit's deferred recover catches the panic — call the function outside a visitor and it blows up.

Proposal: give icebergCRSToGeoArrowMetadata a (geoarrow.Metadata, error) signature, and have VisitGeometry/VisitGeography panic-with-error to thread it through the visitor recover (the convention the other visitor methods already use). That removes the read/write asymmetry and makes the function safe to call on its own.

This is the only one of the #1138 follow-ups that touches a signature, so it's cleaner as its own PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions