No anti-aliasing for cartoline symbol?
James Sohr
jms4 at PO.CWRU.EDU
Fri Apr 1 11:43:27 PST 2005
Thanks for the suggestions, I really appreciate them.
So far, no worky.
I removed the 'antialias true' from the symbol file, no change.
I removed the 'antialias true' from the style area, no change.
I re-added the 'anti-alias true' to the style area, and set the linejoin
type in the symbol file to round, the linecap type to round, and
linejoinmaxsize to 3... and the edges of my lines and corners got rounder,
but no change in the aliasing.
I then removed all layers except for the layer in question, removed the
background color set for the whole map, removed the projection settings,
removed all the labels, so that I was down to a simple single layer and
there still is no change in the aliasing.
I even tried to get antialiased single-pixel width lines to work by not
using any symbol reference or size parameter:
MAP
...
LAYER
TYPE LINE
DATA "myshapefile.dbf"
NAME "roads"
COLOR 0 0 0
STYLE
ANTIALIAS TRUE
END
END
...
END
Even this did not work-- my single pixel line was still very much aliased!
In the archives, I noticed at least one other fellow could not get the
single-pixel line anti-aliasing to work, and wonder if this issue is
related to the cartoline symbols not being anti-aliased.
Any other ideas out there? Could this possibly be some sort of bug?
Thanks,
James
On Fri, 1 Apr 2005 10:17:26 -0800, Ken Lord <kenlord at GMAIL.COM> wrote:
>Hi William,
>
>I just tried your suggestion of setting linecap, linejoin, and
>linejoinmaxsize in the symbol definition, and it has improved my
>output.
>
>There must be a bug since I used the supposed default values, so I
>expected no difference but there was.
>
>James, give William's suggestion a try and see if it helps you too.
>
>Cheers,
>Ken Lord
>Vancouver BC
>
>On Apr 1, 2005 10:06 AM, William K <woklist at charter.net> wrote:
>> I've been using cartolines for a while. I think you need to specify
>> antialias in the STYLE for a class, not the symbol. The antialias in
>> the SYMBOL definition (as Ken Lord said) is for truetype fonts.
>>
>> Oh, not paying attention to your example, I see you do say antialias in
>> the style. Hmm, foggy... memory... try specifying the linecap,
>> linejoin and linejoinmaxsize in your symbol, I think I may have had
>> problems when I didn't (all mine do now), even if you specify same as
>> the defaults.
>>
>> It's been a while since I used the antialias for cartolines, tho - I
>> think it's a bit slow, or the quality wasn't all that great (I believe
>> it's done by GD?). And if you still use normal lines also in a map,
>> there will be a mix of aliasing and antialiasing.
>>
>> I switched to a different method that gives accross-the-board
>> antialiasing - design and draw the map at 2x or 4x size with no
>> antialiasing anywhere, then use PHP's image functions to resample the
>> image with antialiasing. I find that the antialiasing produced this
>> way looks much better, closer to what I expect from using graphics
>> programs, even for font rendering. Requires PHP-MapScript of course,
>> and a bit of programming, but it works fine. Unless you have a fast
>> processor, the 4x will be pretty slow, but it looks better. I even use
>> this method for generating high quality PDF output, instead of using
>> mapserver's builtin PDF output.
>>
>>
>> On Apr 1, 2005, at 9:11 AM, James Sohr wrote:
>>
>> > Like so many others, I've used the circle symbol with various sizes
to
>> > draw my lines for the past few years. The results have been pretty
>> > good,
>> > but the aliasing on the roads has always bothered me, especially when
>> > the
>> > true-type labels are beautfully anti-aliased right beside them.
>> >
>> >
>> > I recently read in the archives that the relatively new cartoline
>> > symbol
>> > supports anti-aliasing. However, when I use the cartoline symbol and
>> > turn
>> > antialiasing on, the lines drawn are still aliased.
>> >
>> >
>> >
>> > I'm using Mapserver 4.5 on Windows XP with the latest GD library. Is
>> > there something in my setup that is preventing the cartoline from
being
>> > anti-aliased? Does someone have an online example that shows the
>> > cartoline symbol being anti-aliased?
>> >
>>
>> -----
>> William Kyngesburye <kyngchaos at charter.net>
>> http://webpages.charter.net/kyngchaos/
>>
>> Theory of the Universe
>>
>> There is a theory which states that if ever anyone discovers exactly
>> what the universe is for and why it is here, it will instantly
>> disappear and be replaced by something even more bizarrely
>> inexplicable. There is another theory which states that this has
>> already happened.
>>
>> -Hitchhiker's Guide to the Galaxy 2nd season intro
>>
>>
>
>
>--
>==============================
>Ken Lord B.Sc., A.Dipl.T.H.
>7488 Magnolia Terrace
>Burnaby BC, V5E 4L1
>604-777-2171
>kenlord at gmail.com
>kenlord at email.com
>klord at bgcengineering.com
More information about the MapServer-users
mailing list