[Mapserver-users] Unique layer naming for WMS serving

Brent Fraser bfraser at geoanalytic.com
Tue Aug 26 12:02:37 PDT 2003


This is a multi-part message in MIME format.

------=_NextPart_000_1016_01C36BD2.52B03650
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Daniel,

  I see that the WMS server portion of Mapserver renames the layers (by =
adding _01, _02, etc) to ensure the names are unique.  Is there a way to =
prevent that?


Some background...

  I've used multiple layer definition for the same data (well almost the =
same data) in a map file to improve performance of rendering raster over =
a wide range of scales.  I'll preprocess the data by reampling the high =
resolution raster to medium and low res, then have three layers i the =
map file all named the same but visible only at a scale range approriate =
for their resolution.  As the user zooms in, Mapserver automatically =
switches to the higher resolution.  Works well with standard Mapserver, =
but using WMS protocol two of the layers get renamed.  This means that =
the user now needs to attach three layers and turn them on and off.

    Another way I've used the same-layer-name feature is to use the same =
name for point, line, and polygon layers representing one theme such as =
cadastre or structures.  But I doubt if WMS clients would tolerate =
that...

  I've tried grouping (GROUP and WMS_GROUP_TITLE) but it exposes the =
individual layer names to the user (it may have to do for now).

  In my experiments with WMS_GROUP_TITLE, it seems that only one group =
is recognized per map file and that all layers will be included in it.  =
Is that true?

Thanks for your comments!.
Brent Fraser
GeoAnalytic Inc.
Tel:(403) 213-2700
bfraser at geoanalytic.com
www.geoanalytic.com

------=_NextPart_000_1016_01C36BD2.52B03650
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Daniel,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>  I see that the WMS server =
portion of=20
Mapserver renames the layers (by adding _01, _02, etc) to ensure the =
names are=20
unique.  Is there a way to prevent that?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Some background...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>  I've used multiple layer =
definition for the=20
same data (well almost the same data) in a map file to improve =
performance of=20
rendering raster over a wide range of scales.  I'll preprocess the =
data by=20
reampling the high resolution raster to medium and low res, then have =
three=20
layers i the map file all named the same but visible only at a scale =
range=20
approriate for their resolution.  As the user zooms in,=20
Mapserver automatically switches to the =
higher resolution.  Works=20
well with standard Mapserver, but using WMS protocol two of =
the layers=20
get renamed.  This means that the user now needs to attach three =
layers and=20
turn them on and off.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>    Another way I've =
used the=20
same-layer-name feature is to use the same name for point, line, and =
polygon=20
layers representing one theme such as cadastre or structures.  But =
I doubt=20
if WMS clients would tolerate that...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>  I've tried grouping (GROUP and=20
WMS_GROUP_TITLE) but it exposes the individual layer names to the user =
(it may=20
have to do for now).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>  In my experiments with =
WMS_GROUP_TITLE, it=20
seems that only one group is recognized per map file and that all layers =
will be=20
included in it.  Is that true?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your comments!.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Brent Fraser</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>GeoAnalytic Inc.<BR>Tel:(403) =
213-2700<BR><A=20
href=3D"mailto:bfraser at geoanalytic.com">bfraser at geoanalytic.com</A><BR><A=
=20
href=3D"http://www.geoanalytic.com">www.geoanalytic.com</A></FONT></DIV><=
/BODY></HTML>

------=_NextPart_000_1016_01C36BD2.52B03650--




More information about the MapServer-users mailing list