Map-tile edge rendering issue

Christopher Schmidt crschmidt at METACARTA.COM
Fri Sep 14 12:40:49 PDT 2007


On Fri, Sep 14, 2007 at 11:40:25AM -0700, Chris Hodgson wrote:
> I see that someone else has already documented something closely related 
> to this issue:
> 
> http://crschmidt.net/blog/archives/154/mapserver-rendering-bug/
> 
> And that it has already been solved in tilecache by adding a buffer 
> around the meta-tiles during rendering - but I don't think that solution 
> will help with the single-pixel-wide line. Meta-tiling and/or increasing 
> the size of the tiles would reduce the likelihood of this happening, but 
> I don't think they could prevent it. 

It would prevent it, because the problem only presents itself at tile
edges -- and the data from MapServer no longer *has* any visible tile 
edges in a meta-tiled TileCache instance. To see similar behavior to
TileCache metatiling, set the 'gutter' option on your WMS layer to '15'
or something similar (see http://openlayers.org/dev/examples/gutter.html)
and I bet you'd see the problem disappear.

> Rendering oversize tiles/meta-tiles 
> and cropping them wouldn't have any effect, unless you were using 
> anti-aliasing, in which case the problem might be reduced to the line 
> getting more faint as it crossed the edge, but still I don't think that 
> the line would be properly rendered.

If you're not convinced, try the gutter option. If that doesn't fix it,
you'd be right -- but I bet it will.

> I suppose this might be considered a minor issue because of how rarely 
> one would expect to have their lines be nearly parallel to and cross the 
> tile boundaries, but I've actually seen that it can happen on just about 
> any line that crosses a tile boundary at an acute angle.

I certainly don't consider this bug to be minor issue, but I wrote code
to fix the problem, so I would assume that's obvious ;)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the MapServer-users mailing list