[Geoserver-users] Drawing labels on linestring with PerpendicularOffset

Hi,

I would like to use perpendicularOffset option to display street names,
but I noticed that the option is only applied to straight streets.

Digging into the code of LabelCacheImpl, I found that linestring with
maxAngleChange < MIN_CURVED_DELTA (3°) are painted with “paintStraightLabel” (painted according to the offset value)
while others are painted with “paintCurvedLabel” (painted ignoring offset value)

Does this mean that there is no perpendicularOffset implementation for LineStrings
and no way to offset labels on linestrings with segments having more than 3° angles ?

As I have an implementation of OffsetCurve based on JTS (and made available in
OpenJUMP), I’d be interested in trying it for this purpose.
Is there a way to apply a function defined in a third party jar on the fly to my geometry ?
Any hint for that ?

Thanks for the help

Michaël Michaud
tel : 01 43 98 85 59
DT/SD/TVD “Carte à la carte”
Institut Géographique National