Pipelines in Dash Leaflet

Hello I am trying to use Dash leaflet to plot some data involving gas and energy and I am trying to plot the EIA Natural Gas Interstate and Intrastate Pipelines found here: U.S. Energy Atlas

But it is my first time really using Dash leaflet or Geojson so I am struggling to get the lines to show up as a Layer Option

Hi @Conorl86 did you test your approach with an other geojson file? From the docs, for example?

The geojson you are trying to visualize is huge, maybe you are running into performance issues. Try zooming out on the map of your linked page.

1 Like

Hi @AIMPED thanks for the response. I had to reshape the Json a little bit to get it to work properly but I am running into other issues. I now have two pretty massive jsons, the pipelines I linked and the US railroads, and the performance of the app is really low. I used tools like mapshaper even going down to 1% simplified and still running into problems where if the user moves the view at all the app takes about 4 to 5 seconds to refocus the lines. I tried a solution where my goal was to only show the lines within the bounds of the view but I could never get the filtered json to work with the dl.GeoJSON. I was wondering if you had any ideas to help with an issue like this.

There’s a tutorial on how to use vector tiling in Leaflet to handle large datasets at Tutorial: PostGIS + Geoserver + Leaflet

I regret I don’t know if it can be made to work with Dash