one way roads, drawing spaced arrows
rich.fromm
nospam420 at YAHOO.COM
Mon Jan 21 13:22:05 PST 2008
I'm trying to mark the direction of travel of one way roads. My preference
is
to use a LABEL and a LAYER of TYPE ANNOTATION (since then the spacing will
take into account the rest of the labels), but after a bit of
experimentation
I've given up on this (although if anyone has any thoughts about this, feel
free to respond).
I've managed to get this working somewhat in two different ways with a LAYER
of TYPE LINE. In the first case, I defined a pair of vector SYMBOLs:
SYMBOL
NAME 'backArrow'
TYPE vector
POINTS
0 1
1 0
-99 -99
0 1
1 2
-99 -99
0 1
4 1
END
END
SYMBOL
NAME 'fwdArrow'
TYPE vector
POINTS
4 1
3 0
-99 -99
4 1
3 2
-99 -99
4 1
0 1
END
END
and in the second case, I defined a pair of truetype SYMBOLs:
SYMBOL
NAME "fwdArrowFont"
TYPE truetype
FONT verdana
CHARACTER ">"
END
SYMBOL
NAME "backArrowFont"
TYPE truetype
FONT verdana
CHARACTER "<"
END
(I'd eventually use a font with a real arrow marker, but this is sufficient
for testing.)
The problem in both cases is that there are too many arrows, there is no
spacing between them.
For the vector case, I tried putting the following within the SYMBOL:
PATTERN
1 1
END
or even this (I'm not sure if the numbers refer to repeats of the symbol, or
pixels):
PATTERN
5 5
END
but neither had any effect. Is SYMBOL.PATTERN not supported with TYPE
vector?
It works as expected for me with TYPE simple.
For the truetype case, I tried the following within the SYMBOL:
GAP 5
While this does indeed introduce some spacing, a side effect is that the
symbols are no longer properly rotated along the orientation of the line.
They are now just always written horizontally. This seems to be the case
for
any GAP value other than 0 (or no GAP value, as 0 is the default).
Any ideas what I'm doing wrong, or other approaches to take? I found a few
related questions on the mailing list (one of these is where I decided to
try
the truetype solution), but nothing that I've been able to use to get this
to
fully work:
http://www.nabble.com/Arrow-for-a-line-to3560206.html#a3560206
http://www.nabble.com/draw-a-line-with-arrows-indicating-direction-of-tavel...-to4800664.html#a4801215
http://www.nabble.com/symbol-point-with-vector-to3049629.html#a3049629
http://www.nabble.com/One-way-roads-to6507366.html#a6507366
Thanks in advance for any help anyone might have.
This is with a locally compiled version of mapserver 5.0.0, using locally
compiled versions of gd 2.0.35 and agg 2.5, with everything else from Debian
packages on debian 3.1 (sarge), configured as such:
MapServer version 5.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=WBMP OUTPUT=SVG
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=THREADS INPUT=POSTGIS
INPUT=SHAPEFILE
- Rich
--
View this message in context: http://www.nabble.com/one-way-roads%2C-drawing-spaced-arrows-tp15006747p15006747.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list