Skip to content

Treat stroke-symbols as other symbols unless -W is set #7788

@PaulWessel

Description

@PaulWessel

Description of the desired feature

It has annoyed me for some time that using symbols like cross, dash, etc., i.e., just line features, requires -W to set the pen thickness, making it very complicated to have variable pen widths. Also, color is not set by -G as for other symbols but taken from the pen. That color could come from a z/cpt lookup if -W+c is given. Etc. So while they are symbols they re second-class citizens in many ways.

Because of history an upgrade needs to be backwards compatible. I think this is:

  • If -W is used to set pen with constant color or variable via -W+c we honour that as the current solution as backwards compatibility.
  • If no -W then stroke symbol pen width is f * symbol_size, and if -G is set we set the pen to that color (same if z/cpt lookup)

This would allow -Sx14p -Gred to draw a red cross with pen width f *size and -Sx14p -Ct.cpt will do the same f * size but with pen color set via z/cpt.

So what is a reasonable f? Here are three candidates (ignore the other but reported in #7787) - I think going beyond this range gets odd: Please give your votes:

Note: As they say, different strokes for different blokes, one could also entertain a new GMT defaults MAP_STROKE_WIDTH that could default to our preferred choice but the users could override it for some project.

line_symbols_10

line_symbols_15

line_symbols_20

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions