Skip to content

Converting lat/lon numpy array(s) to geoarrow-rust objects? #643

Answered by kylebarron
wx4stg asked this question in Q&A
Discussion options

You must be logged in to vote
ring_offsets = Array.from_numpy(np.arange(0, (poly_coords_closed.shape[0] + 1), 5, dtype=np.int32))

You missed the * 5 in the second arg, so you're not creating the right length of offsets array.

You also need to pass in a table, not just a geometry to the layer class, because most of the time you have some attribute per geometry. This is something maybe we could relax in the future.

See repro notebook here: https://github.com/kylebarron/lonboard-radar-example/blob/d372b6526d6fd766e6767c80ccbfea27914590b2/radar-viz-lonboard.ipynb. That repo also has a pixi env file if you want to reproduce it.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@wx4stg
Comment options

@kylebarron
Comment options

@kylebarron
Comment options

Answer selected by wx4stg
@wx4stg
Comment options

Comment options

You must be logged in to vote
0 replies
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