Closed Shamskn closed 11 months ago
I will double check when I'm back to a computer with this open, but I'm almost positive you can do as_geoarrow(x, coord_type=ga.CoordType.INTERLEAVED)
!
When integrating the arrow file into DeckGL
by the way you should try using https://github.com/geoarrow/deck.gl-layers (though it's still in development). I expect to implement automatic handling for struct arrays soon
I hadn't quite gotten to rendering the documentation, but it's there now! https://geoarrow.github.io/geoarrow-python/main/pyarrow.html#geoarrow.pyarrow.as_geoarrow
I will double check when I'm back to a computer with this open, but I'm almost positive you can do
as_geoarrow(x, coord_type=ga.CoordType.INTERLEAVED)
!
Thank you! I had a suspicion I was missing a config somewhere.
by the way you should try using https://github.com/geoarrow/deck.gl-layers (though it's still in development). I expect to implement automatic handling for struct arrays soon
Brilliant, This is exactly what I needed! Thank you, Kyle. You saved me the time I would have spent implementing it.
Brilliant, This is exactly what I needed! Thank you, Kyle. You saved me the time I would have spent implementing it.
It's still pretty early in development, so not everything will likely work out of the box, but contributions welcome
Problem Statement
The GeoArrow specification currently supports coordinates encoded as a Struct array, storing the coordinate values as separate arrays (i.e.,
x: [x, x, ...], y: [y, y, y, ...]
) and aFixedSizeList
of interleaved values (i.e.,[x, y, x, y, ...]
). When integrating the arrow file into DeckGL, the binary format requires the interleaved coordinate format. With the currentga.as_geoarrow
defaulting to Struct array encoding, there is a need to create the interleaved array from the individual x and y arrays, which introduces some overhead on the frontend.Feature Request
Is there a way to obtain the interleaved format from the
as_geoarrow
function? Or a trick I am missing to do this with the current functionalities?Thank you for all the amazing work on this project. Super cool!