Opened 12 years ago

Last modified 6 years ago

#1939 new enhancement

Add line style option to vareas ps.map

Reported by: voncasec Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Ps.map Version: svn-trunk
Keywords: vareas Cc:
CPU: All Platform: All

Description

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
type boundary
color blue
style 1111110000
label Lakes
lpos 1
end

vareas lake
color white
fcolor blue
label Lakes
lpos 1
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:

vareas lake
color blue
fcolor blue
style 1111110000
label Lakes
end

Change History (9)

comment:1 by hamish, 12 years ago

Milestone: 6.4.37.0.0
Version: svn-releasebranch64svn-trunk

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

comment:2 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:3 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:4 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:5 by neteler, 7 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:6 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:7 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:8 by martinl, 6 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:9 by martinl, 6 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.