[mapserver-users] cartographic lines
David Nugent
davidn at datalinktech.com.au
Mon Jun 8 18:31:47 PDT 2009
Hello all,
i've come across a cosmetic issue I'm trying to solve and looking for
advice. Specifically this relates to drawing street/road lines, although I
guess it relates to any type of cartographic line.
I'm using mapserver 5.4.1 using AGG renderer with quantize enabled:
OUTPUTFORMAT
NAME 'AGG_Q'
DRIVER AGG/PNG
IMAGEMODE RGB
# FORMATOPTION "QUANTIZE_FORCE=ON"
FORMATOPTION "QUANTIZE_NEW=ON"
FORMATOPTION "QUANTIZE_DITHER=OFF"
FORMATOPTION "QUANTIZE_COLORS=256"
END
Mapserver was built with --with-experimental-png (which does indeed
resolve the colour variations between tiles that I reported earlier).
I'm drawing street layers with elipses, but I'm now wondering if that is
the best way to achieve the result, being an inner colour with a border,
viz:
STYLE
COLOR [border_color]
SYMBOL "road_line"
SIZE $x
END
STYLE
COLOR [surface_colour]
SYMBOL "road_line"
SIZE $x-2
END
where road_line is a simple SYMBOL elipse.
The problem I'm seeing is two-fold.
Firstly, the ends are rounded, which is not desirable where roads of
different classes (defined in different layers) join. I think this can be
solved by drawing all streets in the same layer and using different
classes with EXPRESSION statements, but my brief experiment with this
resulted in a large detriment effect on rendering speed. If it matters,
the layers are in PostGIS (and appropriately indexed).
So my question is, is there a better or at least an alternative way of
drawing roads with borders which does not result in this problem?
The second problem is that I'm trying to add OPACITY to some layers, such
as tunnels, so that they either appear underneath other objects or at
least allow other objects to show through. However - and it may be related
to the use of symbols to draw the roads - this results rendering as shown
in the attached file, with elipses of a different shade appearing where
objects "intersect". Can this be avoided (perhaps by using a different
method for drawing road lines)?
Note that since I am rendering a flat tile which includes a background I'm
using RGB rather than RGBA and I suspect this may affect rendering of
OPACITY in layers. However I can't seem to find the magic that will render
a background colour other than black (and yes, I'm using IMAGECOLOR in the
MAP section, but it seems to have no effect when rendering with
transparency).
Best regards,
David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: map01.jpg
Type: image/jpeg
Size: 26564 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090609/840455bd/attachment.jpg>
More information about the MapServer-users
mailing list