But unfortunately length value differs on different zoom scales on layer preview (default GeoServer) and is far away from real value. Zooming in or out value is changing by multiplying or dividing by 2 (same as scale).
Tried the same labeling SLD for polygon – calculates and shows good.
GeoServer 2.5 snapshot on tomcat6 jdk1.6 x64.
Checked with QGIS - that line has only 2 vertices (no duplicates).
PostGIS ST_Length function calculates ok for this line.
Am I something missing with GeoServer? Or this could be a bug?
p.s. my data does not have native SRS, just declared EPSG:3346. But same for line and polygon tables.