jupyter-widgets / ipyleaflet

A Jupyter - Leaflet.js bridge
https://ipyleaflet.readthedocs.io
MIT License
1.49k stars 364 forks source link

Support rendering large GeoJSON datasets (+100Mb) with WebGL #815

Open danwild opened 3 years ago

danwild commented 3 years ago

Hi,

I'm interested in an open source alternative to PyDeck/DeckGL for rendering large GeoJSON datasets on an interactive map with python (DeckGL uses MapBoxGL v2 for map, which is no longer open source).

I've made an initial plugin for leaflet (well, an extension for an existing plugin) to handle this rendering. I'm now interested in leveraging this functionality in a python context, but I have no experience with writing ipywidgets 😅

Before I get started, I'm wanting to get a bit of an idea..

Cheers, Dan

danwild commented 3 years ago

Related: https://github.com/jupyter-widgets/ipyleaflet/issues/410

martinRenou commented 3 years ago

Hi,

Thanks for sharing! Yes, we would be really interested in this :)

As you seem to be really familiar with JavaScript and LeafletJS already, you might not have too much trouble trying to include it in ipyleaflet. It would be awesome if you could give it a try! And I would be happy to guide you.

You might want to look at how the GeoJSON layer is implemented JS side in ipyleaflet: https://github.com/jupyter-widgets/ipyleaflet/blob/master/js/src/layers/GeoJSON.js And how it is implemented Python side: https://github.com/jupyter-widgets/ipyleaflet/blob/master/ipyleaflet/leaflet.py#L1111

danwild commented 3 years ago

Thanks @martinRenou, I'll take a look soon and let you know if I get stuck

giswqs commented 1 year ago

@danwild Any updates on this one? Your demo https://onaci.github.io/Leaflet.glify.layer/ looks great. It would be nice if ipyleaflet can support rendering large vector datasets.

giswqs commented 1 year ago

Just found geojson-vt, which might be relevant to this.

danwild commented 1 year ago

Hey @giswqs, I did write a little plugin for folium which might be useful here as a guide:

https://github.com/onaci/folium-glify-layer