[mapserver-users] Rendering Challenges - Polygon labeling
Brent Fraser
bfraser at geoanalytic.com
Tue May 10 08:09:16 PDT 2011
I've been thinking about the polygon label challenge. The difficulty
is the view (the extent of the rendered map image) may be completely
inside the polygon-to-be-labeled (and so no polygon edges are visible),
partially overlap the polygon, or completely enclose the polygon.
Here's my thought on how to handle the various cases:
1. if View completely within Poly, then
place Label at top left of View
(but be careful, there could be multiple layers of polygons putting
labels there
so maybe the user should specify X,Y, location in pixels?)
2. else if Poly partially overlaps View
place Label at inside edge (POSITION FollowEdgeInside?) of Poly
3. else (polygon is completely within view)
3.1 if Label fits within Poly
place Label within (allow: CC, FollowEdgeInside,
FollowEdgeOutside)
3.2 else if rotated text fits within Poly
rotate Label and place within
3.3 else
place Label beside Poly (allow the eight positions similar
to point labeling?)
Might be a big effort to implement, and I have no clue how to make it
configurable via the map file....
--
Best Regards,
Brent Fraser
More information about the MapServer-users
mailing list