ipyleaflet icon indicating copy to clipboard operation
ipyleaflet copied to clipboard

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

Open danwild opened this issue 3 years ago • 6 comments

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..

  • is this something other people might interested in?
  • have I missed something, does this functionality already exist in somewhere..?
  • would this project/repo be the correct place to add this functionality?
    • if so, any guidance on making contributions + how to write the ipywidget wrapper would be much appreciated..

Cheers, Dan

danwild avatar Apr 19 '21 03:04 danwild

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

danwild avatar Apr 19 '21 03:04 danwild

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

martinRenou avatar Apr 19 '21 06:04 martinRenou

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

danwild avatar Apr 19 '21 23:04 danwild

@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 avatar Dec 11 '22 18:12 giswqs

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

giswqs avatar Dec 11 '22 18:12 giswqs

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

danwild avatar Dec 11 '22 22:12 danwild