[GIS] Leaflet filled contour map

contourjavascriptleafletweb-mapping

I have evaluated the Getis-Ord Gi*-spatial statistic for each point in my map. Like this, each point is assigned a Gi-score and due to this a certain color, as you can see in the image below.

What I would like to do now is to group points of the same color and make them appear as an area of that color, similar to the second image.

enter image description here
enter image description here

Best Answer

Checkout turf.js isobands function.

Though ultimately @Diffusion_net is right: trying to do this in the browser is going to be much harder than doing it on your own using Arc/qGIS. If your data is relatively static, this shouldn't be an issue. If you have to perform these calculations on the fly in the browser, then isobands should get you there.