Bug report #16413

sld line pattern fill rotation is counter-clockwise, in GeoServer is clockwise

Added by Gabriele Monfardini about 7 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:No Copied to github as #:24322

Description

I have a layer style with a PolygonSymbolizer filled with a line pattern fill with a rotation

<se:PolygonSymbolizer>
  <se:Fill>
    <se:GraphicFill>
      <se:Graphic>
        <se:Mark>
          <se:WellKnownName>horline</se:WellKnownName>
           ...
        </se:Mark>
        <se:Rotation>
          <ogc:Literal>135</ogc:Literal>
        </se:Rotation>
        ...

The rotation is evaluated counter-clockwise with positive values.

Importing the SLD in GeoServer, rotation is evaluated clockwise, so the result is not the same.
I'm not a SLD expert but looking at SLD documentation it seems that rotation should be evaluated clockwise, as in GeoServer.

History

#1 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#2 Updated by Andrea Aime over 6 years ago

  • Resolution set to not reproducable
  • Status changed from Open to Closed
  • Description updated (diff)

From the SLD specification:

"The Rotation element gives the rotation of a graphic in the clockwise direction about its
center point in decimal degrees, encoded as a floating-point number"

However I've just tried doing a line fill with a rotation of 45, qgis rotated the line clockwise, and exported the value as 45, which is also interpreted as clockwise. Importing it in GeoServer showed instead a counter-clockwise rotation (after "fixing" the symbol name from "horline" to "shape://horline", this is one issue we still have to harmonize between the two projects, along with similar support with rotation in fills, GeoServer does it but adds extra spaces around the line).

I believe the bug is actually on the GeoServer side, closing it here (spoken as a GeoServer developer :-p )

Also available in: Atom PDF