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

Tiles returned onViewportLoad for binary layers have unusable content

Open Chris-Stevenson-Git opened this issue 4 years ago • 3 comments

Description

Commit 6492 has changed the tiles that get returned onViewPortLoad so that string and numeric properties are separated with no way to recouple.

Flavors

  • [X] React
  • [ ] Python/Jupyter notebook
  • [ ] MapboxLayer
  • [ ] GoogleMapsOverlay
  • [ ] CartoLayer
  • [ ] DeckLayer/DeckRenderer for ArcGIS

Expected Behavior

No response

Steps to Reproduce

Loading MVT Tile layer and using onViewPortLoad function. The tiles returned have content with polygons with properties and numericProps which carry no way to identify and reunite the numeric props with it's string propeties or corresponding polygon.

Environment

- Framework version: 8.6.4
- Browser: Chrome 96.0
- OS: Windows 10

Logs

No response

Chris-Stevenson-Git avatar Dec 20 '21 05:12 Chris-Stevenson-Git

What do you expect the callback to return?

Pessimistress avatar Dec 20 '21 20:12 Pessimistress

So this is the response from a non binary tile. The tile's content has an array of 86 polygons each with their geometry and properties. image

And on the binary tiles, content is split up so that the properties of my polygons are separated into string and numeric values across properties and numericProps. This wouldn't be such an issue except in my example, my polygons have IDs which are all just dumped into an array called 'id' with no way to now know which ID relates to which polygon or it's other properties. image

I expect the callback to return the numeric and string properties together, or at least in such a way that I can again link them together if necessary

Chris-Stevenson-Git avatar Dec 20 '21 21:12 Chris-Stevenson-Git

The binary format is designed to be friendly with WebGL, not humans.

  • If you wish to see GeoJSON data, then set binary: false.
  • If you want to use binary, you can convert it back to GeoJSON using binaryToGeoJson from @loaders.gl/gis docs

Pessimistress avatar Dec 20 '21 21:12 Pessimistress