antialiasing line features..

Dylan Beaudette dylan at IICI.NO-IP.ORG
Wed Nov 2 11:32:36 PST 2005


Great!

That did the trick!

Now the question is, is it possible to antialias polygon features?

Thanks!

Dylan

On Nov 1, 2005, at 11:39 PM, thomas bonfort wrote:

> actually there's a smarter fix, but that still requires patching gd.c
> without trying it and seeing if it stops your problem, I can't say
> much more wether it corresponds to your case or not.
> you'll have to download and patch the last version of gd, and make
> sure mapserv is linked to the patched version.
>
> the patch is to add this near line 3035 of gd.c at the beginning of
> static void gdImageSetAAPixelColor(gdImagePtr im, int x, int y, int
> color, int t)
>
> if(x<0||y<0||x>=im->sx||y>=im->sy)
> {
>        return;
> }
>
>
> cheers,
> tb
>
>
> On 11/2/05, Dylan Beaudette <dylan at iici.no-ip.org> wrote:
>> Interesting...
>>
>> I am having sporadic segfaults from mapserv, especially when there 
>> are a lot
>> of line features, that are set to use antialiasing...
>>
>> Any ideas if this is related to your problems?
>>
>> Note that maps are generated fine for lines with few elements...
>>
>> Dylan
>>
>>
>> On Tuesday 25 October 2005 11:55 pm, thomas bonfort wrote:
>>> hi list,
>>> I'm also having problems with mapserver or mapscript dying on certain
>>> antialiased lines. I think I tracked the bug down to gd, I still have
>>> to find the time to find out in what cases it happens. For those
>>> interrested, for me gd segfaults for me in file gd.c on line 3055,
>>> because it is called with out of bounds values for pixel position. 
>>> the
>>> call is being made on lines 3098 or 3119, with the argument
>>> (y>>16)+1 (line 3098)
>>> or
>>> (x>>16)+1 (line 3119)
>>> which seems to me to be out of image bounds.
>>>
>>> My fix is to set the clipping regions of lines 3069-3071 to 1 pixel
>>> inside, which is a quick workaround which prevents the segfaults, but
>>> produces poor quality for short line segments.
>>>
>>> cheers,
>>> tb
>>>
>>> On 10/26/05, Flavio Hendry <flavio at tydac.ch> wrote:
>>>> hi Abe
>>>>
>>>> as said, I had problems with it (hanging mapserver). and the ones 
>>>> which
>>>> seemed to work, I did not see a difference (was using jpeg as 
>>>> output).
>>>> png24 is no option, resulting size of images too large.
>>>>
>>>> Mit freundlichem Gruss / Best Regards
>>>> Flavio Hendry
>>>>
>>>> ----------------------------------------------------------------
>>>> TYDAC NEWS http://www.tydac.ch/german/index.php?menu=News_actual
>>>> ----------------------------------------------------------------
>>>> ############ Mit freundlichen Gruessen / Kind Regards
>>>> ############ mailto:flavio at tydac.ch
>>>> ############ TYDAC AG - http://www.tydac.ch
>>>> #### #### Geographic Information Solutions
>>>> #### #### Luternauwg 12 -- CH-3006 Bern
>>>> ############ Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860
>>>> ----------------------------------------------------------------
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Abe Gillespie <abe.gillespie at GMAIL.COM>
>>>> To: MAPSERVER-USERS at LISTS.UMN.EDU
>>>> Date: Tue, 25 Oct 2005 12:11:00 -0400
>>>> Subject: Re: [UMN_MAPSERVER-USERS] antialiasing line features..
>>>>
>>>>> Hey everyone,
>>>>>
>>>>> Sorry, a somewhat OT - This thread has piqued my interest a little.
>>>>> Would someone mind posting examples of aliased vs. antialiased
>>>>> images?
>>>>>  I'm just curious about the results you can get.
>>>>>
>>>>> Thanks!
>>>>> -Abe
>>>>>
>>>>> On 10/25/05, Dylan Beaudette <dylan at iici.no-ip.org> wrote:
>>>>>> On Oct 25, 2005, at 2:54 AM, Flavio Hendry wrote:
>>>>>>> Ciao Giorgio
>>>>>>>
>>>>>>> It might not be the antialiasing but the png24. png24 files tend
>>>>>
>>>>> to get
>>>>>
>>>>>>> very large, i.e. 400k compared to 70k as a JPEG (check your
>>>>>
>>>>> output
>>>>>
>>>>>>> directory). Maybe you try JPEG.
>>>>>>>
>>>>>>> However, I had quite problems with the antialiasing, working on
>>>>>
>>>>> some
>>>>>
>>>>>>> layer and on some the system hung (no error messages, just
>>>>>
>>>>> hanging when
>>>>>
>>>>>>> zooming). Removing the antialiasing from the layer worked.
>>>>>
>>>>> Strange
>>>>>
>>>>>>> behaviour, anybody having this problem?
>>>>>>>
>>>>>>> Mit freundlichem Gruss / Best Regards
>>>>>>> Flavio Hendry
>>>>>>>
>>>>>>> ----------------------------------------------------------------
>>>>>>> TYDAC NEWS http://www.tydac.ch/german/index.php?menu=News_actual
>>>>>>> ----------------------------------------------------------------
>>>>>>> ############ Mit freundlichen Gruessen / Kind Regards
>>>>>>> ############ mailto:flavio at tydac.ch
>>>>>>> ############ TYDAC AG - http://www.tydac.ch
>>>>>>> #### #### Geographic Information Solutions
>>>>>>> #### #### Luternauweg 12 -- CH-3006 Bern
>>>>>>> ############ Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860
>>>>>>> ----------------------------------------------------------------
>>>>>>
>>>>>> Yes. I am noticing a seemingly erratic behavior: If I enable
>>>>>> antialiasing with JPEG output format, it does not work. If I 
>>>>>> enable
>>>>>> antialiasing in a tiled line layer it does not work...
>>>>>>
>>>>>> Are there some good ground rules for antialiasing? i.e. ONLY 
>>>>>> PNG24,
>>>>>> etc. ?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> --
>>>>>> Dylan Beaudette
>>>>>> Soils and Biogeochemistry Graduate Group
>>>>>> University of California at Davis
>>>>>> 530.754.7341
>>
>> --
>> Dylan Beaudette
>> Soils and Biogeochemistry Graduate Group
>> University of California at Davis
>> 530.754.7341
>>
>
>
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341



More information about the MapServer-users mailing list