developmentseed / developmentseed/lonboard

Lonboard with tiled data

Open
#414 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
964
Forks
54
Avg merge
5m
Merged PRs (30d)
1

Description

Lonboard is really powerful for rendering large-ish datasets but sometimes people have data that's just too large to send to the frontend. This can be large raster datasets (think Landsat and Sentinel) or large vector datasets (think Overture).

In https://github.com/manzt/anywidget/pull/453 Trevor manz showed how it's possible to have the JS side _request_ data from Python. This is different from all existing data transfer in lonboard, because existing methods _push_ data from Python to JS rather than _pulling_ data from JS.

This also has the potential to greatly simplify authentication because the frontend requests data _via the Jupyter comm_. If you have raster data on a remote server and you had a separate tile server running on that machine, you'd usually have to manage the firewall to expose the data. With lonboard, we can have an _in process_ tile server as part of lonboard, so there's no authentication aside from setting up Jupyter.

A very bare prototype of the RPC can be found in https://github.com/developmentseed/lonboard/pull/413.
The deck `TileLayer` has a [`getTileData` callback](https://deck.gl/docs/api-reference/geo-layers/tile-layer#gettiledata). We can `await` the call to Python.

On the raster side, I think the simplest approach would be to add rio-tiler as an optional dependency and use it to generate PNG/JPG tiles. One question is whether we'd need to put rio-tiler in a threadpool so that each request doesn't block the Python kernel.

We could additionally port something like [`geojson-vt`](https://github.com/mapbox/geojson-vt) to export GeoArrow tiles. Then we could have a TileLayer that renders GeoArrow layers as sublayers. And then in theory we could handle truly any size of vector data.

cc @batpad @vincentsarago

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.