ecoquants / nrel-uses

Competing ocean uses work with National Renewable Energy Lab (NREL)
https://ecoquants.github.io/nrel-uses
0 stars 0 forks source link

heatmap as alternative #1

Open bbest opened 6 years ago

bbest commented 6 years ago

image

bbest commented 6 years ago

How-to: creating a heat map from raster data with Leaflet — Makina Corpus

Approach

Given the number and the weight of the geographical data layers to take into account, it was not reasonable to compute everything client-side. We have therefore chosen to generate server-side black and transparent images for each layer and then to process them in the browser to create the heatmap.

Serve MapServer

We use MapServer, easy to setup and flexible enough to add or modify layers in the future. It allows us to request non-tiled images using WMS (which will be easier to analyze in the browser).

Each layer can be served by MapServer in a black and transparent style for the desired coordinates. Points and lines have a 5 pixels width: this way, only one pixel in 25 can be analyzed to generate the heatmap, while being sure to never miss an object.