landam / grass-gis-git-migration-test

0 stars 0 forks source link

Add line style option to vareas ps.map #89

Open landam opened 5 years ago

landam commented 5 years ago

Reported by voncasec on 19 Apr 2013 16:49 UTC 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

GRASS GIS version and provenance

svn-trunk

Migrated-From: https://trac.osgeo.org/grass/ticket/1939

landam commented 5 years ago

Comment by hamish on 22 Apr 2013 06:22 UTC 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

landam commented 5 years ago

Modified by @landam on 12 May 2016 06:43 UTC

landam commented 5 years ago

Modified by @landam on 25 Aug 2016 15:51 UTC

landam commented 5 years ago

Comment by @landam on 27 Aug 2016 13:42 UTC Milestone renamed

landam commented 5 years ago

Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by neteler on 12 Jun 2018 20:48 UTC

landam commented 5 years ago

Comment by @landam on 25 Sep 2018 16:51 UTC All enhancement tickets should be assigned to 7.6 milestone.

landam commented 5 years ago

Comment by @landam on 25 Jan 2019 21:07 UTC Ticket retargeted after milestone closed