0

I'm using geoserver to stack several raster images that have different ELEVATION parameter (each ELEVATION "number" is a different layer so to speak).

This raster images are 16-bit one channel Geotiffs, from which i make a false color image in geoserver with this SLD:

        <ColorMap>
          <ColorMapEntry color="#FFFFFF" quantity="0" opacity="0"/>
          <ColorMapEntry color="#000000" quantity="1" opacity="1"/>
          ... other irrelevant entries ...
          <ColorMapEntry color="#FF00FF" quantity="65534" opacity="1"/>
          <ColorMapEntry color="#FFFFFF" quantity="65535" opacity="0"/>
        </ColorMap>

As you can see, I'm creating a transparency from values 0 and 65535 in the original raster data.

The problem arises when I stack several elevations, where transparencies are not rendered correctly, and do not show data on lower layers (elevations):

Transparencies do not show data of other lower elevations

I've tried to set input transparency to #FFFFFF, but it won't work as it is a 16 bit image. And tried MergeBehavior FLAT and STACK, with no success.

  • can you clarify where the issue is in your image, several of your images seem to have transparency and lower tiles showing through – Ian Turton Nov 30 '17 at 9:10
  • 1
    How are you stacking the various elevations? Can you show us a request? – Andrea Aime Nov 30 '17 at 10:12
  • hi @IanTurton, yes of course: there should be visible data (the green-orange layers) inside every black polygon. Each polygon is a different layer, stacked with geoserver. The problem is that upper layers are creating a transparent "void" in lower layers where they should be data. This void is generated by no-data pixels in upper layers that seem to be considered transparent after the image stacking is made and not before. – luckyshonway Nov 30 '17 at 15:09
  • Hi @AndreaAime, thanks for your feedback, y stacking them querying for a list of elevations, for example: .../wms?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&TILED=true&LAYERS=test:ndvi1&ELEVATION=172,173,174,94,195,196,197,198&TIME=2017-11-11T00:00:00Z&WIDTH=256&HEIGHT=256&SRS=EPSG:3857&STYLES=&BBOX=-6993070.843754206,-4189972.1424802206,-6990624.85884908,-4187526.157575095 – luckyshonway Nov 30 '17 at 15:10
1

Querying a list of elevations implies that the image mosaic will do the mosaicking in the original color/sample model, and only after that the colormap will activate on the result.

To achieve what you want I believe you'll have to use separate WMS requests and stack on the client side.

  • Oh, i was trying to avoid that, as having multiple layers client side is a mess. I noticed that with RGB images that have an alpha channel this works fine. But i guess i cant add an alpha channel to a single channel 16 bit image. – luckyshonway Dec 1 '17 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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