Hi,
<div><br></div><div>For same kind of need (i.e hydrologic line to label), i've found that:</div><div> - Your lines must be long enough to allow the label to fit on (seems already your case, as it works for you without ANGLE FOLLOW)</div>
<div> - You have to increase MAXOVERLAPANGLE property</div><div> - Your lines have to be as smooth as possible</div><div><br></div><div><br></div><div>Below a sample of such a thing with two layers, one with the data itself and one another using a generalization trought PostGIS ST_Simplify to help the geometry to be smoother enough</div>
<div><br></div><div><pre> LAYER
NAME "label"
METADATA
"ows_title" "Label des cours d'eau Carthage AERMC"
"ows_extent" "573401 6050407 1242369 6811885"
"ows_featureid" "gid"
END
PROJECTION
"init=epsg:2154"
END
TYPE line
STATUS on
DATA "geom from (SELECT gid, ST_simplify(geom, 200) As geom , toponyme, classe::integer
FROM aermc.cours_eau WHERE toponyme IS NOT NULL)
AS foo using unique gid using srid=2154"
CONNECTIONTYPE postgis
CONNECTION "host=XXXX port=5432 dbname=XXXX user=XXXX"
LABELITEM toponyme
CLASSITEM classe
CLASS
EXPRESSION ([classe] <= 2)
LABEL
COLOR 0 0 0
OUTLINECOLOR 210 210 210
TYPE TRUETYPE
FONT vera
SIZE 10
ANTIALIAS TRUE
POSITION UC
ANGLE FOLLOW
PARTIALS FALSE
MINFEATURESIZE auto
REPEATDISTANCE 500
MAXOVERLAPANGLE 45
END
END
CLASS
EXPRESSION ([classe] <= 4)
LABEL
COLOR 30 30 30
OUTLINECOLOR 210 210 210
TYPE TRUETYPE
FONT vera
SIZE 8
ANTIALIAS TRUE
POSITION UC
ANGLE FOLLOW
PARTIALS FALSE
MINFEATURESIZE auto
MAXOVERLAPANGLE 40
END
END
CLASS
LABEL
COLOR 60 60 60
OUTLINECOLOR 210 210 210
TYPE TRUETYPE
FONT vera
SIZE 8
ANTIALIAS TRUE
POSITION UC
ANGLE FOLLOW
PARTIALS FALSE
MINFEATURESIZE auto
MAXOVERLAPANGLE 40
END
END
END
LAYER
NAME "cours_eau"
METADATA
"ows_title" "Cours d'eau Carthage"
"ows_extent" "573401 6050407 1242369 6811885"
"ows_featureid" "gid"
END
PROJECTION
"init=epsg:2154"
END
TYPE line
STATUS on
DATA "geom from (SELECT gid, geom , classe::integer FROM aermc.cours_eau
WHERE toponyme IS NOT NULL)
AS foo using unique gid using srid=2154"
CONNECTIONTYPE postgis
CONNECTION "host=XXXX port=5432 dbname=XXXX user=XXXX"
CLASSITEM classe
CLASS
EXPRESSION ([classe] <= 2)
STYLE
COLOR 33 33 210
WIDTH 5
END
END
CLASS
EXPRESSION ([classe] <= 4)
STYLE
COLOR 66 66 210
WIDTH 3
END
END
CLASS
STYLE
COLOR 99 99 210
WIDTH 1
END
END
END </pre><pre><br></pre><pre><br></pre><pre><br></pre><pre>HTH,</pre><pre><br></pre><pre>--</pre><pre>Olivier</pre></div>