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.
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.
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.