Search code examples
gridheatmapmapserver

how to remove edges from MapCache seeding process of MapServer heatmap


I am trying to prepare heatmap on a MapServer-based a point layer. The configuration seems to work on MapServer side (fig 1) but there is an issue with MapCache. The problem with MapCache is concerning edges that appears when requesting WMTS. There is no smooth transition to the next tile (fig 2). I think that this is somehow related to the grid used in seeding map process (I used WebMercator). Will appreciate if anyone can give me suggestion on how to eliminate those edges ?

Fig 1. no edges

Fig 2. edges

part of layer mapserver config that might be important:

PROCESSING "RANGE_COLORSPACE=HSL" 
PROCESSING "KERNELDENSITY_RADIUS=%radius%"  
PROCESSING "KERNELDENSITY_COMPUTE_BORDERS=ON"
PROCESSING "KERNELDENSITY_NORMALIZATION=auto"
OFFSITE 0 0 0

SCALETOKEN
    NAME "%radius%"
    VALUES
        "0" "50"
        "25000000" "15"
    END 
END 

Solution

  • In paragraph 2.7. the rfc of mapserver heatmap https://mapserver.org/sq/development/rfc/ms-rfc-108.html describes that the tiling can be applied. In order to work properly the kerneldensity_normalizastion have to be set as numeric value.

    According to this insted of:

    PROCESSING "KERNELDENSITY_NORMALIZATION=AUTO

    set:

    PROCESSING "KERNELDENSITY_NORMALIZATION=1

    or any other numeric value.

    update: be aware that this RFC is outdated