deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

[Feat] [pydeck] Support Ragged Arrays in Binary Transfer

Open dakoop opened this issue 3 years ago • 0 comments

Target Use Case

This would allow PathLayer and SolidPolygonLayer, which require startIndices, to work from pydeck. Currently, pydeck's binary transfer requires a 2D rectangular shape (see the np.stack call) and does not write startIndices.

Proposal

The idea would be to use pandas to compute the startIndices, length, and size and serialize them separately for each attribute, and encode them directly instead of having the data_utils.binary_transfer figure them out. The np_data array is then built to be flat. See

https://github.com/dakoop/deck.gl/commit/fe018c53c38a0f542068af4648451a22a1848e70

dakoop avatar Apr 22 '22 23:04 dakoop