[mapserver-users] Mapserver tile edge rendering behaviour
Steve Lime
sdlime at gmail.com
Wed Mar 11 21:08:44 PDT 2020
MapServer uses the center of the pixel but does compensate for models
defined by other specs (e.g. WMS, which defines an extent as outer edge to
outer edge. Straight CGI (mode=map) will adjust the requested extent based
on the image size to ensure that square cells are being used. WMS allows
for non-square cells.
It’s possible you’re seeing the effect because the requested extent and
image size are off just a bit. Would need a little more info to be sure.
When tiling you can set edge buffers to deal with this sort of thing.
Generally you’d choose a value to match your widest symbol. How exactly
you’d deal with this depends on how you’re generating tiles (mapcache,
mode=tile, etc...).
—Steve
On Wed, Mar 11, 2020 at 8:59 AM Johannes Paul <johannespaul92 at gmail.com>
wrote:
> Hello,
> I use a data source (postgis or shapefile, it doesn't matter, the
> behaviour is the same), that is made of a simple polygon created from a
> bbox, on which is applied a simple 'outlinecolor'.
> When calling my URL with a bbox that is *exactly* the size of that
> polygon, mapserver only renders the bottom and the right hand edges; top
> and left hand egdes are not drawn on my output image!?
> When forcing 'WIDTH 2', I do get a thin (1 pixel) outline on the top and
> left hand edges, and a thick (2 pixels) on the bottom and right hand edges.
> I expect this is related to where mapserver is taking the coordinate
> within the pixel (center? corner?), but I'm not sure ? Any option to
> overcome that behaviour ?
> Thanks in advance.
> Johannes
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200311/17bf8024/attachment.htm>
More information about the MapServer-users
mailing list