Holes in polygons in some scales
Jacob Delfos
jacob.delfos at MAUNSELL.COM
Mon Jul 25 21:59:10 PDT 2005
Silke,
I'm probably not the best person to answer this, but I think the reason for your polygon disappearing is that you're using 8bit png, which is indexed colour. When the map is rendered, each pixel is assigned a colour closest to what the colour table is filled up with. If your polygon is black, and its width is less than half a pixel, it is likely not to show up (because the majority of the invididual pixels consist of the surrounding colour, which is picked instead). The colour for that pixel will be whatever surrounds the polygon. It will not 'interpolate' the colour (make it grey, anti-aliased), like 24bit real-colour would.
If you think that is not the case, maybe check your file's geometry. I have seen (parts of) polygons disappear if the geometry wasn't valid, e.g. if a shapefile was imported from CAD, which allows unclosed polygons.
regards,
Jacob
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Silke Reimer
Sent: 26 July 2005 01:02
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Holes in polygons in some scales
Hallo!
I have a question concerning map rendering. Let me first describe the
effect that I observed:
If you have a look at [1] you see a part of map with a street going
from southwest to northeast which is correctly shown as kind of a
line.
On [2] you see the same street on a smaller scale. Now the line is
shown with some gaps inbetween which - in my opinion - shouldn't
happen.
First I thought that this happens because the road is defined as a very
narrow polygon which becomes too small in some scales to be
considered for rendering. So I changed the layers type from polygon
to line. According to my theory the full outline of the polygon
should be drawn. But the gaps still remained.
Now my questions: Do you have any idea what happens here? And do you
know how to avoid this effect by using a special configuration in
the mapfile?
Many thanks for your help,
Silke
[1] http://ftp.intevation.de/users/silke/mapserver/polywithoutholes.png
[2] http://ftp.intevation.de/users/silke/mapserver/polywithholes.png
--
Intevation GmbH
Georgstrasse 4 49074 Osnabrück, Germany
http://intevation.de http://intevation.de/~silke
FreeGIS.org http://freegis.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050726/4bb63d7c/attachment.htm>
More information about the MapServer-users
mailing list