Skip to content
Discussion options

You must be logged in to vote

I'm not sure if this is the exact issue you're hitting, but you'll also hit similar issues with this:

    let batch =
        RecordBatch::try_from_iter([("geometry", geom_array.to_array_ref()), ("id", col)]).unwrap();

When you're doing this, you're saying to RecordBatch to infer the schema for you. The problem is that when you call to_array_ref, the Arc<dyn Array> loses all information about the extension type.

Instead, you need to always explicitly pass the schema with RecordBatch::try_new, where you build the schema yourself. And any GeoArrow fields should be created with, e.g. GeoArrowType::to_schema.

This is mostly a documentation issue but I'm not sure where else to document it. I …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@C-Loftus
Comment options

@C-Loftus
Comment options

@kylebarron
Comment options

Answer selected by C-Loftus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants