How to Fix Ratty Line Rendering in WMS? - Redux

Bill Thoen bthoen at GISNET.COM
Fri Jul 27 10:29:28 PDT 2007


I've now posted some images showing the problem at 
http://www.gisnet.com/wms_examples/.

To summarize the problem, I've set up a MapServer WMS Server that's got 
road data in native MapInfo format with a coordinate system based on 
Lat/Long (EPSG:4269). When I display it in a MapServer client map using 
the same projection EPSG:4269, the line work looks nice and clean. 
However, if I try to use a different projection in my client like 
EPSG:2163 (Lambert), the lines are pretty shabby looking.

I'm not using transparency or antialiasing (I couldn't get that to work 
in the WMS anyway). The WMS produces png images, and my OUTPUTFORMAT 
directive in my WMS' MAP file :looks like:

   OUTPUTFORMAT
      NAME png
      DRIVER "GD/PNG"
      MIMETYPE "image/png"
      IMAGEMODE RGB
      EXTENSION "png"
   END

My MapServer installation details:
MapServer version 4.10.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Does anyone know what's causing the lines to come out so ratty in the 
2163 projection or how to fix it?

- Bill Thoen

Gregor Mosheh wrote:
> Bill Thoen wrote:
>> But now my problem is that linework from my WMS looks pretty ratty 
>> compared to using the same data in vector form. Is there any fix for 
>> this? How can I produce smooth road lines?
>
> Are you using transparency? I find that antialiasing and transparency 
> just don't work well together; the antialiasing gets turned 
> transparent, which makes it look awful. I'd love to hear advice on 
> this topic, as I have similar issues with fonts and symbols looking 
> crummy under transparency.
>
> If it's not transparency, how about your image format? Are you using 
> JPEG? JPEG is nice stuff, but you've probably seen JPEGs that get all 
> crummy if someone tried to compress too hard. Try setting the 
> OUTPUTFORMAT options to turn up the JPEG quality to 100.
>
> Anything beyond that, we'd probably need to know a thing or two about 
> your image format, maybe see an example of it, ...
>



More information about the MapServer-users mailing list