[mapserver-dev] raster rewind

David Fuhry dfuhry at acm.org
Fri May 15 19:42:55 EDT 2009


Updated patch, with some bug fixes.  All the previous caveats about its 
limited scope, still apply.

-Dave


David Fuhry wrote:
> 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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raster_rewind.v5.patch
Type: text/x-diff
Size: 7338 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20090515/fc590e35/raster_rewind.v5-0001.bin


More information about the mapserver-dev mailing list