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.
Follow-up to #1138.
icebergCRSToGeoArrowMetadatapanics on an unsupported (projjson) CRS, while the symmetric read functiongeoArrowCRSToIcebergCRSreturns a clean error for the same case. It only works today becauseiceberg.Visit's deferred recover catches the panic — call the function outside a visitor and it blows up.Proposal: give
icebergCRSToGeoArrowMetadataa(geoarrow.Metadata, error)signature, and haveVisitGeometry/VisitGeographypanic-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.