[mapserver-users] Unexpected result from overlapping images in tile index

Peter Schmitt pschmitt at gmail.com
Wed Jan 18 15:31:24 PST 2017


Hi,

I have a tile index to render a layer from two images.  The images are
black.png
https://github.com/pedros007/mapserver-tindex-problem/blob/master/black.png?raw=true
which has NODATA values over the white areas and grayscale pixels with
intensity 1 and gray.png with intensity 128 and zero NODATA values in the
image
https://github.com/pedros007/mapserver-tindex-problem/blob/master/gray.png?raw=true

I have a tileindex http://bl.ocks.org/d/968e0f11f1fd9b02444c3765bbb285a1
that basically stacks/flattens the black image on top of the gray one.
However, when I make a WMS request to the layer:

LAYER
        NAME my_layer
        TYPE RASTER
        TILEINDEX tindex.shp
        TILEITEM "location"
        OFFSITE 0 0 0
        STATUS OFF
    END
END

I get only the gray image.  In other words, I expected to get this:
https://github.com/pedros007/mapserver-tindex-problem/blob/master/expected.png?raw=true

but instead I get this:
https://github.com/pedros007/mapserver-tindex-problem/blob/master/gray.png?raw=true

I have a couple of work-arounds that I'm not crazy about:

1. Add Layer masks http://www.mapserver.org/development/rfc/ms-rfc-79.html to
two separate layers, make two WMS requests and stack the results client
side. I have gotten this working for two layers. However, I may need to
render a very large number of such layers and think this wont work
client-side (via OpenLayers-3).
2. I could burn in NODATA values (or use a mask) to gray.tif, but I'd
rather not modify my source data.

A version of this email & example files are in a GitHub repo:
https://github.com/pedros007/mapserver-tindex-problem

-- 
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170118/f11778bb/attachment.html>


More information about the mapserver-users mailing list