qfes / rdeck

Deck.gl widget for R
https://qfes.github.io/rdeck
MIT License
97 stars 0 forks source link

Layer data enhancements #100

Closed anthonynorth closed 10 months ago

anthonynorth commented 10 months ago

Re-implements layer data serialisation and parsing, and column accessors.

Serialisation

Geometries are flattened into arrays of flat coordinates. This format is significantly faster to serialise with jsonlite (points are roughly the same), allows for deck.gl optimisation for paths and polygons, and fixes js memory issues flattening large multi-geometry tables.

Serialisation is no longer dependent on {sf} internal geometry representation. Uses {wk}'s vertex filter.

Parsing

Layer data types are now dynamically resolved in browser using dataTransform and accessors with embedded conditionals. External json files may now be formatted as either row-major, or the much better column-major.