[mapserver-users] Polygon layer does not cover labels

Matt McClelland matt at wildwalks.com
Sat Jul 7 15:54:03 PDT 2012


Hi Sven

I had exactly the same problem :)

If labelcaching is on, the labels are rendered at the end or the map
drawing, so they always end up on top.
you can turn label cache off for that particular layer.  But this will mean
that you will end up with labels running into each other on your map (as
the contour labels will not be aware of other labels).

I solved my issue buy just not showing contour labels for the 10m
contours.  (I do not show the 0m contour line or label)
This solved the issue for the ocean but not for lakes and other water
bodies.

What would be really nice is a script that can 'tweak' DEM based on map
data.  something that changes the DEM to ensure contours follow shorelines,
and that the bottom of a valley follows creeks.  But I just dream of such a
tool.

Happy mapping

Matt  :)



On Sun, Jul 8, 2012 at 4:36 AM, Sven Geggus <lists at fuchsschwanzdomain.de>wrote:

> Hello,
>
> I have a mapfile which contains amongst other a labeled contour layer.
> However these are not very acurate because they are derived from
> SRTM. For this reason I render the ocean polygon layer above the contour
> layer.
>
> This works fine for the contours but does not seem to work for the
> contour labels.
>
> So the question is how to make the polygon layer opaque for labels.
>
> Here are the relevant parts of my mapfile:
>
> LAYER
>   TYPE LINE
>   NAME contours
>   PROCESSING "LABEL_NO_CLIP=ON"
>   ...
>       STYLE
>          WIDTH 1.0
>          COLOR "#BE9E9E"
>        END
>        LABEL
>          ANGLE FOLLOW
>          REPEATDISTANCE 450
>          TYPE TRUETYPE FONT sc PARTIALS FALSE OUTLINEWIDTH 0
>          SIZE 8
>          COLOR "#996666"
>        END
>     END
> END
>
> LAYER
>   TYPE POLYGON
>   PROCESSING     "APPROXIMATION_SCALE=FULL"
>   name ocean
>   ...
>   CLASS
>    STYLE
>     COLOR "#579ae3"
>    END
>   END # of class
> END
>
>
>
> Regards
>
> Sven
>
> --
> "The only thing we have to fear is fear itself" (Franklin D. Roosevelt)
>
>
> /me is giggls at ircnet, http://sven.gegg.us/ on the Web
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120708/28b3ea24/attachment.html>


More information about the mapserver-users mailing list