0

I have a GeoServer(2.16.2) publishing a raster layer through WMS(1.1.1). On the client side, I have a Leaflet(1.7.1) canvas display the raster layer.

As can be seen from the figures below, map is being displayed unbalanced in intensity/bright within the tiles; At each level the tiles are wrongly balanced.

This is the code I'm running on the client side:

  <body>
    <div id="map"></div>
    <script>
      var map = new L.Map('map', {
        crs:L.CRS.EPSG4326
      }).setView([0,0], 2);

      var wmsLayer = L.tileLayer.wms('http://localhost:8080/geoserver/mars/wms?', {
        layers: 'mars:MGS_MOLA_DEM_global'
      }).addTo(map);
    </script>
  </body>

Any ideas on how to fix this?

enter image description here

enter image description here

enter image description here

0

1 Answer 1

2

The raster in question is not 8bit and has not been given a style, each requested tile is constrast stretched and reduced to 8 bits based on the data in the tile. Please configure a style for that raster that forces a fixed constrast stretch, or associates a colormap (guess you want the former, by looking at the image).

See documentation here: https://docs.geoserver.org/stable/en/user/styling/sld/reference/rastersymbolizer.html

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