new version

Stephen Lime steve.lime at dnr.state.mn.us
Tue Jun 15 10:32:23 EDT 1999


Actually you can achieve that effect. You do this using sorted shapefiles 
drawn as annotation layers. Assuming you have some variable that allows 
you to classify cities (such as population), you could sort the shapefile (using
sortshp/shpsort) on that item so that the largest cities get drawn last and
hence labeled first (remember LIFO). Since with annotation layers markers
are only drawn if labels are drawn, at small scales most small cities will overlap
with larger city names and not be drawn. As you zoom in there is more space 
for labels and gradually the smaller cities will appear, but larger cities will always
take priority. I generally like this method better than the class based scaling as
it handles areas with either very dense or very sparse feature occurences better.

There is another layer option called MAXFEATURES that limits the number of
features drawn in any one map on a layer by layer basis. In can be used to create
a similar effect. There are some problems with it and label overlap though that
I'm still working on so you get the desired results.

Steve

Stephen Lime
Internet Applications Analyst
MIS Bureau - MN DNR

(651) 297-2937
steve.lime at dnr.state.mn.us

>>> "Grzegorz Myrda" <mapadm at polsl.gliwice.pl> 06/15 3:28 AM >>>
Thanks for such a detailed answer.

>
> 3- No, it's there and called "LABELMINSCALE" and "LABELMAXSCALE".
>
Oh, sorry. I got accustomed in previous version it was LABEL property, not
LAYER. So I thought I can achieve effect of disappearing smaller cities
class labels while scaling cities layer.

Thanks,
Grzegorz





More information about the mapserver-users mailing list