Skip to content

Lonboard with tiled data #414

Open
Open
@kylebarron

Description

@kylebarron

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 manzt/anywidget#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 #413.
The deck TileLayer has a getTileData callback. 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 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions