[GRASS-dev] Getting a dotted line in ps.map - Style mechanism
Hamish
hamish_b at yahoo.com
Tue Aug 5 04:17:50 EDT 2008
Alessandro Frigeri wrote:
> I wonder how can I obtain a dotted linestyle with ps.map.
> Using the style parameter with a 1010 value, I only get a dashed
> line. What controls the length of the dashes? From the ps.map
> man-page (6.3.0) I really did not fully understand the mechanism of
> the 'style' parameter.
sorry, the documentation did not match the code very well.
(ie either the docs or the code is buggy, I am not really sure which)
try like:
# spearfish dataset
ps.map out=test.ps << EOF
vlines roads
style 011111111
where label ~ 'highway'
width 0.5
label Highways
end
end
EOF
The first block is draw, the second block is don't draw. So with a single
zero followed by lots of ones it draws a little then skips a lot making a
dotted line.
> Moreover, the example of the style parameter reported in the vlines
> section of the manual with '0-9' value, rises up an error:
>
> ERROR: style 0-9 : illegal line style (vlines)
"0-9" just means some value in the range of zero to nine. Forget about
that, just use 0s and 1s. Any non-zero number will be treated as a one.
I've just updated the man page in SVN to make things clearer:
http://trac.osgeo.org/grass/changeset/32537
although I am not sure if the current way is as-intended or a bug.
intuitively I'd guess that 0 should be don't draw and 1 should be draw,
but alas..
devels see also the PostScript 'setdash' command usage and new debug messages:
http://www.capcode.de/help/setdash
Hamish
More information about the grass-dev
mailing list