Force label for tiny polygon

Norman Vine nhv at CAPE.COM
Wed May 2 07:30:34 PDT 2007


Jørn Vegard Røsnes
> 
> when I change the type from polygon to point, the label is 
> always visible. 
> Unfortunately I get one label for each point in the polygon. 
> Not very readable :-)

Add a separate layer of points for your labels

This gives you much finer grain control

I usually use the polygon centroids for this

Cheers

Norman

> 
> 
> On Wednesday 02 May 2007 15:21, Jørn Vegard Røsnes wrote:
> > Hi all,
> >
> > I want to always display the label for a tiny polygon (oil spill).
> >
> > I feel I've tried many configurations now in the map file, but I 
> > always have to zoom in (from all of Europe, to only coastline of 
> > Portugal), before the label is visible. Here is the current 
> layer definition:
> >
> > LAYER
> >      NAME "oilspill_20070502_141558"
> >      CONNECTIONTYPE POSTGIS
> >      CONNECTION "user=postgres dbname=konserv host=hostname 
> port=5432"
> >      DATA "poly from feature using SRID=4326"
> >      TYPE polygon
> >      #STATUS ON
> >      #TRANSPARENCY 0
> >      DEBUG ON
> >      LABELCACHE ON
> >      LABELITEM "timestamp"
> >      CLASS
> >           #TEXT ([oid]-[timestamp])
> >           EXPRESSION ('[timestamp]' == '20070502_141558' AND 
> > [threshold] >= 0 AND [threshold] < 100)
> >           LABEL
> >             FONT arial
> >             TYPE TRUETYPE
> >             SIZE 7
> >             MINDISTANCE 10
> >             BUFFER 1
> >             POSITION UR
> >             ANGLE AUTO
> >             COLOR 0 0 0
> >             FORCE TRUE
> >           END
> > #          STYLE
> > #             SYMBOL 0
> > #             SIZE 6
> > #             COLOR 224 64 0
> > #          END
> >           COLOR 224 64 0
> >      END
> >      PROJECTION
> >         "init=epsg:4326"
> >      END
> > END
> >
> > Thanks
> >
> > cheers
> > Joern Vegard



More information about the MapServer-users mailing list