[mapserver-users] state label placement
Stephen Lime
sdlime at mninter.net
Wed Oct 3 06:29:44 PDT 2001
I downloaded the layer myself and will take a look. A couple of things
off the top of my head. MINDISTANCE is given in pixels and only deals
with duplicates. POSITION AUTO uses 8 label points that revolve around
the label point. If you want to center directly upon the label point choose
CC explictly. I think there may be enough info in the label cache to add
CC back into the AUTO placement if no marker is being used, I'll file that
as a bug in bugzilla. Finally, polygon label points are generated as follows:
- use midpoint of bbox if that point falls in the polygon
- compute a centroid based on sampling the feature
For odd shaped states (like Mass. or Fla.) the position may not be optimal.
Steve
John R Frank wrote:
> Hi
>
> I'm trying to display a US state boundaries layer that I downloaded from
> nationalatlas.gov. The labels show up many times. Even if I crank up the
> label::mindistance and label::buffer it still shows a few and they are
> pushed away from the center of the state!
>
> When I look at this layer in ArcExplorer, it looks _perfect_. The state
> labels appear once, centered in each state.
>
> How can we achieve this with mapserver? (we love mapserver). My states
> layer is below.
>
> John
>
> LAYER
> NAME states
> TYPE POLYGON
> # TOLERANCE 3
> MAXSCALE 100000000
> MINSCALE 10000
> LABELMAXSCALE 100000000
> LABELMINSCALE 500000
> LABELITEM "state"
> CLASS
> # COLOR 190 255 190
> BACKGROUNDCOLOR 255 255 255
> OUTLINECOLOR 150 150 150
> LABEL
> # ANGLE AUTO
> COLOR 230 0 0
> # OUTLINECOLOR 0 0 0
> TYPE TRUETYPE
> FONT arial
> SIZE 9
> POSITION AUTO
> BUFFER 7
> # WRAP " "
> MINDISTANCE 300000000000
> END
> END
> END
>
> ~
More information about the MapServer-users
mailing list