0

I was wondering if there is a plug in for Leaflet which accomplishes clustering features within a grid layer. Similar to marker clusters this allows for rendering an abstraction of all features with a count of the features within that area. In my case I want to do this for centerlines of a city which is too much to render at higher zoom levels.

The overall end effect is similar to what is seen in the LA geohub:

enter image description here

where you need to click the grid till at proper zoom level to render any features.

1

I'm not sure of any existing plugins to accomplish this, so you may need to pre-process your data (for example, using the free desktop program QGIS) to calculate the number of features within each grid cell.

  1. Create a polygon grid/fishnet
  2. Intersect the road centrelines with the polygon grid
  3. Count the number of lines within each polygon

Use the count to symbolise the polygons, as in your example screenshot

  • Thank you for the suggestions, I will look into this as it sounds exactly what I need. – Diffusion_net Jul 4 '17 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.