Uploaded image for project: 'GeoTools'
  1. GEOT-5632

Default PointPlacement anchor point values do not match SLD 1.0

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 15.4, 16.0, 16.1
    • Fix Version/s: 17-RC1
    • Component/s: render
    • Labels:
      None
    • Environment:

      N/A

      Description

      This issue is related to GEOT-5562

      The org.geotools.styling.AnchorPoint interface class defines a DEFAULT value as having X=0.5 and Y=0.5.

      SLD 1.0 Specification

      According to SLD v1.0 standard on page 47,

      The default point is X=0, Y=0.5, which is at the middle height of the lefthand
      side of the label.

      I can't find any mention of what the default X and Y values should be in other uses of anchor points.

      To meet the SLD v1.0 spec there are 2 options:

      • Update org.geotools.styling.AnchorPoint.DEFAULT to have X=0 and Y=0.5, this would be global so affect all uses of default anchor point.
      • Introduce a PointPlacement default anchor point instance so that it matches the SLD spec.

      SE 1.1 Specification

      The SE 1.1 specification uses AnchorPoint twice:

      • 11.3.2 Graphic - defines AnchorPoint for a graphic with X=0.5 and Y-0.5

      The default point is X=0.5, Y=0.5, which is at the middle height and middle length of the graphic/label text. A system may choose different anchor points to de-conflict graphics/labels.

      • 11.4.4 Label placement - basically says see 11.3.2

      The AnchorPoint element of a PointPlacement gives the location inside of a label to use for anchoring the label to the main-geometry point. It is formally defined in subclause 11.3.2.

        Attachments

          Activity

            People

            • Assignee:
              boundlessgeo-yancy Yancy Matherne
              Reporter:
              robward Robert Ward
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: