labeling of polygons, PARTIALS and FORCE

Kyle Cronan kyle at PBX.ORG
Fri Mar 11 11:21:15 PST 2005


Hello,

I've written some mapfiles that I use to generate tiles for a web
mapping application.  One of these maps is supposed to show tax lots
(polygons) with a label giving the lot number at the center of each lot.

Originally, I had maps that were created dynamically with mapscript, and
I was using the "FORCE true" option to make sure that the label was
always drawn at the center of the lot.  Now that I pregenerate the
tiles, I have to specify the "PARTIALS false" option, or else the labels
get cut off at the edge.  But the problem is that "FORCE true" seems to
override "PARTIALS false".  So I turned off "FORCE true", but this
causes odd behavior at the boundaries between tiles: mapserver begins to
consider label positions that are not in the center, causing many labels
to actually appear on the boundary line between lots, and lots near the
edges to be labelled excessively.

Is it possible in mapfile syntax to say "FORCE true", except when the
label would run off the edge, in which case just drop it?  This would be
very handy--otherwise I have to generate much larger tiles and then
break them up with a separate program, which only partially alleviates
the problem anyway.

Your help is much appreciated,
Kyle Cronan
<kyle at pbx.org>



More information about the MapServer-users mailing list