0

I was trying to apply the following heatmap style to an unprojected layer (EPSG:4326) in GeoServer.

*{
  
  transform: vec:Heatmap(weightAttr:1, radiusPixels:40
    
    , pixelsPerCell:5, 
    
    outputBBOX:env('wms_bbox'), outputWidth:env('wms_width'), outputHeight:env('wms_height'));
  
  raster-channels: auto;
  raster-color-map-type: ramp;
  raster-color-map:color-map-entry(#008000, 0.005,0)
                   color-map-entry(#4B53BC, 0.05, 0.3)
                   color-map-entry(#003348, 0.1, 0.4)
                   color-map-entry(#0099EE, 0.2, 0.5)
                   color-map-entry(#D51606, 0.4, 0.6)
                   color-map-entry(#FF9C33, 0.6, 0.7)
                   color-map-entry(#FFCD42, 0.7, 0.8);
  
}

The image displays correct when using WMS v1.1.1 but on v1.3.0, the WMS image gets flipped.

I have replicated the behavior on a default GeoServer layer: Manhattan (NY) points of interest.

Points:

default style

WMS v1.1.1:

enter image description here

WMS v1.3.0

enter image description here


However, projected layers such as sf:bugsites seems to display correctly.

I believe this is not intended behavior but that the best solution for now is to work with projected data or stick with WMS v 1.1.1?

1 Answer 1

2

This is intended behaviour, and is required for WMS 1.3.0. Its documented as https://docs.geoserver.org/latest/en/user/services/wms/basics.html#axis-ordering

I would stick with WMS 1.1 unless you need something in 1.3.0. Using a different projection or adapting to WMS 1.3.0 are also valid solutions.

2
  • Thanks for the link and I was aware of the bbox changes but now I know why. Although I'm still trying to wrap my mind around why the default point style displays the points in the correct locations in both 1.1.1 and 1.3.0 but the image gets flipped when applying the heatmap style. Is it because it is a transformation style and somehow performs the transformation on latitude/longitude although the point geometry was built using longitude/latitude ?
    – user19349
    Commented Apr 16, 2022 at 13:09
  • It would be odd if it was intended, rather it is something that has not been tested. However, I could not find with github.com/geoserver/geoserver/search?q=heatmap where the error happens.
    – user30184
    Commented Apr 16, 2022 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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