[GIS] How to use rotated text labels in GeoServer based on attribute value

geoserverlabelingsld

I have several text layers in GeoServer, which are now shown as point layers with tiny graphic size and with labels (As mentioned in my previous question). All thses labels are, as expected, drawn horizontal. But I want them to be drawn at an angle, available in corresponding database table.
I can not use simple rotation property, since it rotates all the labels at a specific angle.
How can I accomplish this?

Best Answer

You can use the Rotation tag together with a PropertyName which lets you draw the label based on an angle specified in a corresponding database table:

<Rotation>
    <ogc:PropertyName>rotation_column</ogc:PropertyName>
</Rotation>

You can see more about rotation and labeling here:

Labeling in GeoServer

Related Question