[mapserver-dev] raster rewind

David Fuhry dfuhry at acm.org
Fri May 15 14:37:00 EDT 2009


I just hit a savepoint working on an experimental patch to mapdraw.c, 
which I'm calling "raster rewind".  It's not intended for general use. 
When dealing with a patchwork of raster imagery, where a hi-res layer 
may cover up a broader low-res layer, then the patch can help to discard 
unnecessary low-res layers.  I post it, in case someone finds it 
interesting.

The idea is that if a hi-res layer renders a fully opaque image, then it 
was not necessary to process any lower-level layers that preceded it. 
To determine the former condition, visible raster layers are first 
iterated through *backwards*, each rendered into its own temporary image 
buffer.

If, when iterating backwards, a layer renders a fully opaque image, then 
we can start mapfile layer processing at that index, rather than 0. 
Intuitively, that layer would cover any previous layers' renderings.

Later, I intend to implement a transparency threshold, rather than an 
all-or-nothing opaqueness measure, since some of our raster layers have 
just a few (~ 0.0002%) pixels which match the OFFSITE (transparent) color.

This patch does not handle skipped layers which may have rendered labels.

-Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mapdraw_raster_rewind.v1.patch
Type: text/x-diff
Size: 4736 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20090515/90e56cef/mapdraw_raster_rewind.v1.bin


More information about the mapserver-dev mailing list