Layer priority
Mark Presling
mark at PRESLING.COM
Wed Jun 21 21:23:06 PDT 2006
Hi all.
I'm new to the list and a relative newbie to MapServer.
I'm having trouble with label priority... I have 3 layers - city, town,
populated place and the populated place labels always render in
preference to towns and cities, but I want city labels to always render
with a higher priority. That is, if MapServer has to decide whether to
render a pp label or a city label when they are in the same place I want
the city one to be rendered.
All I can find on this subject is an email from Stephen Lime in 2001
that said this:
"Labels are placed into the cache as layers are processed- they have to
be, and then the
cache is processed in reverse order so that features in the last layer
drawn (i.e. the top layer)
are labeled first. I've not had problems with it."
However, changing the order of layers in the mapfile doesn't fix it. I'm
using WMS to access it, if that makes any difference. Here is what was
said on IRC this morning:
<bitnerd> mrp: try playing with labelcache and postlabelcache in your
layer definition you can do a lot to tweak labeling behaviours with those
<bitnerd> http://mapserver.gis.umn.edu/docs/reference/mapfile/layer
<mrp> Thanks bitnerd. I have tried these, *but I really want the label
cache to work as normal so that I don't get overlaps and clutter.* The
labels can be quite high density. I just need to be able to prioritise
the order they are rendered, but the order in the mapfile doesn't seem
to help
<FrankW> mrp: Did you change the order of your layers in the .map file
or in the WMS request?
<FrankW> I'm not sure, but the order of layers in the WMS request may be
significant.
<mrp> I am using uDig to access the WMS. Changing the order in .map and
uDig don't seem to make a difference
<FrankW> If you can see the apache log file, check the order of layers
in the action wms and see if they vary.
<mrp> ok, I'll have a look now
<mrp>
LAYERS=land,nmcregion,exotic,forest,lake,native,railway,river,riverbed,road,rsrp,town,populatedplace,city
<mrp>
LAYERS=land,nmcregion,exotic,forest,lake,native,railway,river,riverbed,road,rsrp,town,city,populatedplace
<mrp> That's the WMS requests... the order of city and pp makes no
difference
<FrankW> Hmm, I'm out of ideas.
<mrp> they are currently ordered in the mapfile (top to bottom) as city,
town, pp. Changing that order around seems to make no difference
I just need to know what things I can try or look out for (and what the
expected behaviour is).
This is with all 3 layers turned on but with "POSTLABELCACHE true" set
on the city and town layers:
[Damn, the mailing list email size limit is too small for a single
screenshot!!! That's not so good is it??]
I would expect that because city is at the top of the list the labels
would be rendered in the same order of priority.
Thanks,
Mark
--
This message has been scanned for viruses and dangerous
content by MailScanner, and is believed to be clean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060622/e16e783f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mark.vcf
Type: text/x-vcard
Size: 143 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060622/e16e783f/attachment.vcf>
More information about the MapServer-users
mailing list