[GRASS-dev] [GRASS GIS] #1939: Add line style option to vareas ps.map

#1939: Add line style option to vareas ps.map
-------------------------+--------------------------------------------------
Reporter: voncasec | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 6.4.3
Component: Ps.map | Version: svn-releasebranch64
Keywords: vareas | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------
Goal: Displaying a vector area on a map with a solid (or pattern) fill but
with a dashed outline (i.e. to give the impression that it is an
indefinite boundary).

Example of ps.map statement used to create this look:

vlines lake[[BR]]
type boundary[[BR]]
color blue[[BR]]
style 1111110000[[BR]]
label Lakes[[BR]]
lpos 1[[BR]]
end

vareas lake[[BR]]
color white[[BR]]
fcolor blue[[BR]]
label Lakes[[BR]]
lpos 1[[BR]]
end

Problem with this technique:
The map looks great, you get a solid fill colour with a dashed boundary
representing the indefinite edges of the water body, but the legend is not
suitable. The legend representation for the area is a rectangle but a line
for the boundary, so when the two are combined you have a dashed line
bisecting an area.

Possible Solutions: Give the users an option to represent the boundary as
a rectangle in the legend or give the user an option to display a line
style for the area feature.

Ideally, the later option would be chosen as this would allow for the
desired look with only one ps.map statement as opposed to two (although, I
think having the choice to display a boundary as a line or a rectangle
would be nice regardless).

Example of proposed ps.map statement:[[BR]][[BR]]
vareas lake[[BR]]
color blue[[BR]]
fcolor blue[[BR]]
style 1111110000[[BR]]
label Lakes[[BR]]
end

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1939&gt;
GRASS GIS <http://grass.osgeo.org>

#1939: Add line style option to vareas ps.map
-------------------------+--------------------------------------------------
Reporter: voncasec | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Ps.map | Version: svn-trunk
Keywords: vareas | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------
Changes (by hamish):

  * version: svn-releasebranch64 => svn-trunk
  * milestone: 6.4.3 => 7.0.0

Comment:

the idea of adding boundary style option to vareas sounds reasonable
enough.

I'm not very much in favor of overridding the vector legend's
representation, better I think to first fix any core problems so that
would never be thought of, instead of adding another work-around for a
program defect.

note that using "color none" is slightly different than "color white" in
your example:
{{{
vareas lake
   color white
}}}

In the case of 'color none' the dashed lines appear on top instead of
below the area fill, and you might consider 'width 0.5' with it.

also fyi a while ago I added some named shortcuts to the vlines 'style'
instruction as the 01 thing is a bit weird to get used to: `solid, dashed,
dotted, dashdotted` words auto-replace into a predefined 01 pattern.

example reformed for the NC sample dataset:
{{{
g.region n=248500 s=242000 w=643500 e=649500 res=10

ps.map in=- out=test.ps << EOF
vlines lakes
  type boundary
  color red
  #style 1111110000
  style dashed
  label Lakes
  lpos 1
  end

vareas lakes
  color none
  width 0.5
  fcolor blue
  label Lakes
  lpos 1
  end

vlegend
   end

end
EOF
}}}

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1939#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>