GeoServer
  1. GeoServer
  2. GEOS-580

Specifying stroke-width with stroke-dasharray in an SLD adds pixels to the length of the dashes as well as the width

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Not A Bug
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: WMS
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When specifying the 'stroke-width' CssParameter with the 'stroke-dasharray' CssParameter in an SLD, if the stroke-width is more than one pixel, the length of each dash that is drawn is extended by the amount of pixels specified in the stroke-width when only the width should be affected.

      Hence the following would produce a LineSymbolizer with 6 pixel dash followed by a 2 pixel space, not a 4 pixel dash with a 4 pixel space, as it should be.

      <CssParameter name="stroke-width">2.0</CssParameter>
      <CssParameter name="stroke-dasharray">4.0 4.0</CssParameter>

        Activity

        Hide
        Andrea Aime added a comment -

        This is imho a matter of interpretation. Where do you read that the width should not add to the dasharray length? It actually happens only if you use certain cap styles, that are supposed to make lines longer

        Show
        Andrea Aime added a comment - This is imho a matter of interpretation. Where do you read that the width should not add to the dasharray length? It actually happens only if you use certain cap styles, that are supposed to make lines longer

          People

          • Assignee:
            Gabriel Roldan
            Reporter:
            Miles Jordan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: