[mapserver-users] Fractional line widths?
Dane Springmeyer
blake at hailmail.net
Thu Sep 4 19:10:53 PDT 2008
Thomas,
Thanks for the tip, but I think I don't quite understand the right
syntax.
First of all, I'm running the mac binary from kyngchaos, version 5.2.0
I've tried to add two style blocks like:
LAYER
NAME world_opacity
DATA world_borders.shp
STATUS ON
TYPE POLYGON
CLASS
NAME "World"
STYLE
COLOR 242 239 249
OUTLINECOLOR -1 -1 -1
END
STYLE
COLOR -1 -1 -1
OUTLINECOLOR 127 127 127
OPACITY 50
WIDTH 1
END
END # class
END # layer
to create this full mapfile: http://mapnik-utils.googlecode.com/svn/trunk/tutorials/hello_world/mapserver_comparison/mapfile_config/world.map
But that does not produce a result more akin to WIDTH 0.5, from what I
can tell. It simply lightens the color of the outline, and in this
case make it 'seem' even thicker. It is as if the opacity is not
working as a true alpha opacity.
Here is the example output with OPACITY 50:
http://mapnik-utils.googlecode.com/svn/trunk/tutorials/hello_world/mapserver_comparison/mapfile_config/map/hello_world_with_mapserver_mapfile_opacity.png
Is this the expected behavior or have I made an error in my mapfile
syntax (highly likely). Perhaps I am not correctly turning off the
outline for the first style?
The issue may also be with my OUTPUTFORMAT, which is not using the RGBA:
OUTPUTFORMAT
NAME 'AGG'
DRIVER AGG/PNG
IMAGEMODE RGB
MIMETYPE "image/png"
END
I also tried with:
OUTPUTFORMAT
NAME 'AGGA'
DRIVER AGG/PNG
IMAGEMODE RGBA
MIMETYPE "image/png"
END
but I get an error when I add the 'AGGA' (based on reading http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics)
:
msPostMapParseOutputFormatSetup(): General error message. Unable to
select IMAGETYPE `AGG'.
Any thoughts?
Thanks,
Dane
On Aug 31, 2008, at 2:50 PM, thomas bonfort wrote:
> hi.
> yes, you need two style blocks inside your class
> cheers,
> thomas
>
> On Sun, Aug 31, 2008 at 9:43 PM, Dane Springmeyer
> <blake at hailmail.net> wrote:
>> Hi Thomas,
>>
>> Thanks for the followup.
>>
>> The OPACITY keyword seems to apply to both the polyon fill (COLOR)
>> and the
>> outline (OUTLINECOLOR).
>>
>> What is the trick to apply it to only the outline? I tried
>> OUTLINEOPACITY,
>> which of course does not exist.
>>
>> Do I need to pull out a style class for just the outline?
>>
>> Here is the mapfile I am working from:
>>
>> http://mapnik-utils.googlecode.com/svn/trunk/tutorials/hello_world/mapserver_comparison/mapfile_config/world.map
>>
>> Thanks,
>>
>> Dane
>>
>>
>> On Aug 30, 2008, at 12:22 AM, thomas bonfort wrote:
>>
>>> Sorry for not hopping into the thread earlier, blame holidays :)
>>>
>>> For the time being, you can achieve similar output with mapserver
>>> 5.2,
>>> by using the OPACITY keyword at the style level
>>>
>>> STYLE
>>> COLOR r g b
>>> OPACITY 50 # essentially the same as WIDTH 0.5
>>> WIDTH 1
>>> END
>>>
>>> cheers,
>>> thomas
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080904/a2a331e8/attachment.htm>
More information about the MapServer-users
mailing list