mapfish / mapfish-print

A component of MapFish for printing templated cartographic maps. This module is the Java serverside module.
http://mapfish.github.io/mapfish-print-doc/
BSD 2-Clause "Simplified" License
183 stars 417 forks source link

Feature request: Add "strokeLinejoin" attribute to style #678

Open romanzoller opened 6 years ago

romanzoller commented 6 years ago

I would like to be able to configure the line join attribute for line strokes.

This is supported by geotools, but is currently not used in mapfish-print, it looks like geotools defaults to line join "miter".

Suggestion: Add attribute "strokeLinejoin" with the following possible values:

"strokeLinejoin" geotools constant
"bevel" LINE_JOIN_BEVEL
"miter" LINE_JOIN_MITRE
"round" LINE_JOIN_ROUND

(please please do not use the British spelling "mitre", it's not consistent with American spelling used everywhere else, such as "color" for example)

Relevant code in mapfish-print: https://github.com/mapfish/mapfish-print/blob/09307058a756c3504724fad56304733f59e1c8fc/core/src/main/java/org/mapfish/print/map/style/json/JsonStyleParserHelper.java#L797

pvalsecc commented 6 years ago

We have to follow what is specified by SLD (mitre): http://docs.geoserver.org/latest/en/user/styling/sld/reference/linesymbolizer.html#cssparameter

romanzoller commented 6 years ago

Hmm, looks like this is already broken in the specification, because it says:

The graphical parameters and their values are derived from SVG/CSS2 standards with identical names and semantics.

The allowed values for line join are “mitre”, “round”, and “bevel”

Whereas the SVG specification says:

Value: miter | round | bevel | inherit

=> I would still be in favor of the American spelling for "Mapfish JSON Style Version 2".