geoarrow-c
geoarrow-c copied to clipboard
Implement `const char* GeoArrowInferExtensionName(const struct ArrowSchema*)`
There's a good deal of code in Python that would have to be duplicated in R to support inferring the extension name from a storage array. The inference is basically:
- Binary/Large Binary ->
geoarrow.wkb
- String/LargeString ->
geoarrow.wkt
- Struct/FixedSizeList ->
geoarrow.point
- List<Struct/FixedSizeList> ->
geoarrow.multipoint
- List<List<Struct/FixedSizePoint>> ->
geoarrow.multilinestring
- List<List<List<Struct/FixedSizePoint>>> ->
geoarrow.multipolygon
I don't think it needs to perform all out validation...just enough to infer what the extension name would be if it were a valid extension storage type. Then it can be passed to ArrowSchemaInitFromStorage()
to do the actual validation.