Labels and MINFEATURESIZE

Sture Dingsøyr candalt at ONLINE.NO
Fri Feb 2 01:26:05 PST 2007


Hi again and thanx for quick answer:

Here is testdata/mapfile, and this is what I am trying to do:

I have a polygon shape file that i want to show on a large scale (all of norway). The polygons are very small (in extent), and will therefore be very small for us to see when the application is on a large scale (again all of norway).

When I try to put a label on the polygons (at high scales), not all of them are labelled. In fact not many at all. 

I was not able to attach my testdata, so i put them on my webserver. You can download from: http://www.dingsoyr.no/mapserverlabel.zip

Regarding the layer: I have devided it into 2 classes. Class 1 (on high scales) uses a symbol from the font file (via TEXT parameter) to only display a symbol, and class 2 displays the name of the feature (i skipped one of the fontfiles due to limitations on attachments).

By the way: i am using MS4W and MapServer version 4.10.0

Thanx again for all help :-)

Sture



Can you whip up a test case (data and mapfile)?

Steve

>>> Sture Dingsøyr <candalt at online.no> 2/1/2007 4:56:19 AM >>>
Hi again...
I have tried to enter the LABELCACHE OFF to my layer and removed the MINFEATURESIZE, but still not all of the features are labeled...strange... Have tested the data in ArcView...so i think i can rule-out errors in the data..


By default there is no limit on how big a feature is, at least I don't believe there is. So it is not necessary to set the MINFEATURESIZE parameter. Out of curiosity what happens if you at LABELCACHE OFF to the layer object below. That *should * label everything drawn. No collision avoidance will happen then but at least we can see what is and isn't being labeled.

Steve

>>> Sture Dingsøyr <candalt at ONLINE.NO> 1/26/2007 1:53 AM >>>
Hi there...

I have a polygon layer that on high scales only is visible in the map (gif output) as very small areas (maybe as a single pixel). This is fine, but i want to put a label on every polygon regardless of how small they are. 

I have tried putting a label on my class with the MINFEATURESIZE parameter but with no luck. The parameter (MINFEATURESIZE) seems to be working, cause if i set i to e.g. 20 my polygons do not get labled until the scale is smaller.

Is there a way to force labels on a polygon layer regardless of how "small" the polygons are?

My layer definition below:
LAYER
DATA "test"
LABELITEM "NAME"
STATUS on
TYPE polygon
NAME "test"
CLASS 
COLOR 255 0 0
MAXSCALE 100000000
MINSCALE 0
NAME "Test"
LABEL
ANTIALIAS True
FONT "arial"
TYPE truetype
SIZE 7
COLOR 0 0 0
OUTLINECOLOR 255 255 255
OFFSET 0 0
POSITION cc
PARTIALS false
FORCE true
MINFEATURESIZE 1
END
END
END

Regards Sture :-)


More information about the MapServer-users mailing list