Force label for tiny polygon
Jørn Vegard Røsnes
jorn at SPACETEC.NO
Thu May 3 00:24:59 PDT 2007
Thanks,
I added a layer like this and it works as I want:
LAYER
NAME "oilspill_20070502_141558_point"
CONNECTIONTYPE POSTGIS
CONNECTION "user=postgres dbname=konserv host=hostname port=5432"
DATA "poly from feature using SRID=4326"
TYPE point
CLASS
TEXT ([oid]-[timestamp])
EXPRESSION ('[timestamp]' == '20070502_141558' AND [threshold] >= 0
AND [threshold] < 100)
LABEL
FONT arial
TYPE truetype
SIZE 7
MINDISTANCE 0
COLOR 0 0 0
END
COLOR 224 64 0
END
PROJECTION
"init=epsg:4326"
END
END
cheers
Joern Vegard
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