[mapserver-dev] [mapserver-users] RFC-108 : heatmap generation

Thomas Bonfort thomas.bonfort at gmail.com
Wed Feb 5 03:15:49 PST 2014



On 31/01/2014 22:44, Rahkonen Jukka (Tike) wrote:
> 
> Thomas Bonfort wrote:
> 
>> Hi Jukka,
>> Thanks for the comments, which I mostly agree with. I should clearly
>> remove references to the the term of "interpolation" as it does not
>> apply to the proposed solution. Concerning the "heatmap" term that
>> should be replaced by "kernel density" that could be a possibility,
>> although as you said the "heatmap" term has become so common that I'd
>> suspect many users wouldn't give a "kernel density" solution a look even
>> if that is what they are after.
>> I'll rework the RFC to suppress the interpolation references, and use a
>> "connectiontype density", would that work for you?
> 
> Everybody calls them as heatmaps so let it be so but make a difference between density and interpolation. Connectiontype interpolation can be reserved for the future.
>
I've just updated the RFC and code to mention KERNELDENSITY instead of
INTERPOLATION.

>>> I am not sure if this image generator can even make such heatmaps like the salinity map in the beginning of RFC where missing data between the measuring points are (linearly?) interpolated. In that map the density of salinity measurement stations has no effect on the colour. Also in real life even if you measure a hundred times a temperature of +40 degrees from very close measuring points, the maximum temperature does not rise a bit over +40.
>> correct, the proposed solution will be biased by samples close to one
>> another.
> 
>>> The system itself is welcome and I am interested in seeing how the problem of creating automatically a good looking visualization for changing map scales is solved. Perhaps output pixel based interpolation radius and PROCESSING “NORMALIZATION=AUTO" will handle that.
>> I'm not sure I understand what you're looking for here, can you be a bit
>> more precise?
> 
> I tried to say that same settings for radius and colorrange tend to work well only for a limited scale range. Here are two examples which are using the same traffic accidend data.
> http://www.hs.fi/kotimaa/Nettisivusto+paljastaa+Helsingin+vaarallisimmat+risteykset/a1305551700052
> This one overrates accidents at small scale and burns everything red. When you zoom in the accidents almost disappear and the hotspots are lost.
> http://cloudnsci.fi/wiki/demos/traffic_accidents_in_Helsinki_heatmap.html
> This one is static and looks good at medium scales but does not work well at big and small scales.
> 
> I feel that the search radius and colorrange should be adjusted somehow by the scale but I can't suggest how. But perhaps it can be done rather easily with a few scale dependent classes.

The underlying problem I think is that heatmaps aren't designed to
represent your data passed a given scale. We could however ease the task
of generating consistent outputs by specifying the kernel radius in
geographical units rather than in pixels. I'm a bit weary to implement
that though, as it would be very easy to specify a radius that results
in a huge raster buffer being allocated, and could easily lead to
denials of service. Another shortcut that would avoid having to define
multiple scale-dependant layers would be to use the RFC86 scaletoken
mechanism to define multiple kernel radiuses and/or normalization values.

--
thomas

> 
> -Jukka Rahkonen-
> 
> 
> 
> --
> thomas
> 
>>
>> -Jukka Rahkonen-
>>
>> ________________________________________
>> Thomas Bonfort wrote:
>>
>>> Devs,
>>
>>> please have a look at RFC-108 [1]. The associated code and the RFC are
>>> still beta, so there's still plenty of room for modification or remarks.
>>
>>> best regards,
>> thomas
>>
>> [1] http://mapserver.org/development/rfc/ms-rfc-108.html
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


More information about the mapserver-dev mailing list