Antialiasing Again

Ken Boss Ken.Boss at DNR.STATE.MN.US
Fri Apr 21 14:19:31 EDT 2006


Paul--
 
My apologies if this shows up twice, I sent it out yesterday but it appears to have gotten stuck in the network wires somewhere.
 
Anyway, I believe you need to:
 
1) use a 24-bit output image type (IMAGEMODE RGB (or RGBA))
2) set TRANSPARENCY ALPHA in the layer using antialiased lines
3) set ANTIALIAS TRUE in the STYLE element of the CLASS with antialiased lines
 
The following mapfile snippets enable antialiased county borders:
 
...
IMAGETYPE png24
...
OUTPUTFORMAT
  NAME png24
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGB
  EXTENSION "png"
END
...
LAYER
  NAME counties
  TYPE line
  STATUS default
  DATA "/r01/data/drs/data/gen/state/mn/bdry_counln2"
  TRANSPARENCY alpha
  SYMBOLSCALE 5000000
  CLASS
    STYLE
       WIDTH 3
       COLOR 1 1 1
       ANTIALIAS true
    END
  END
END
...
 
Note that the bdry_counln2 shapefile referenced in the counties layer is a line shapefile.  If I drop a polygon shapefile into the DATA element, and leave TYPE as line, the results are more or less the same.  Alternatively, I can use a polygon shapefile, set TYPE to POLYGON, and use OUTLINECOLOR in place of COLOR in the STYLE element.  In any case, I'm not sure that the POLYLINE type is supported any longer.
 
Finally, note that you can tweak the combination of STYLE->WIDTH and SYMBOLSCALE to modify line widths in your output images.
 
HTH,
 
--Ken


>>> Paul Dugas <paul at DUGAS.CC> 4/19/2006 10:59 AM >>>

I cannot seem to get MapServer-4.8.3 to draw antialiases lines.  It is
working for polygons, but not for polylines.  I got this working a long
time ago for another project but can't seem to this time.  What I'm
really trying to accomplish is a smoothed two-tone line.  I've tried
using ELLIPSE and CARTOLINE symbols with no success.  

Would someone be willing to share a small working example I can start
from?

Thanks in advance,

Paul
-- 
Paul Dugas, Computer Engineer                Dugas Enterprises, LLC
paul at dugas.cc        phone: 404-932-1355     522 Black Canyon Park
http://dugas.cc        fax: 866-751-6494     Canton, GA 30114 USA
--
On site at GDOT's W.Annex, 404-463-2860 x199
--
This e-mail and any attachments are confidential.  If you receive
this message in error or are not the intended recipient, you should
not retain, distribute, disclose or use any of this information and
you should destroy the e-mail and any attachments or copies.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060421/a2b331a8/attachment.html


More information about the mapserver-users mailing list