<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.k
{mso-style-name:k;}
span.s
{mso-style-name:s;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Mike,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks for your reply, but it is when I call the wms services as a client I get the errors already in the validation. I would like to do something like this:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">But I guess I am doing something that is not meant to be this way.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">MAP<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> NAME MAP_MAIN<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> SIZE 1000 1000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> CONFIG "PROJ_LIB" './'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> UNITS dd<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> EXTENT 9.624750 52.33333 30.333333 66.500000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> PROJECTION
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> 'init=epsg:4326'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> END<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> IMAGETYPE png<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> FONTSET './fonts/fontset.lst'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> SYMBOLSET "./symbols/symbols.sym"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> OUTPUTFORMAT<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> NAME 'AGG'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> DRIVER AGG/PNG<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> IMAGEMODE RGB<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> END<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> SHAPEPATH ../data/shape<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> WEB<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> IMAGEPATH '/tmp/'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> IMAGEURL '/tmp/'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> METADATA<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> "ows_enable_request" "*"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> 'wms_title' 'MAP_MAIN'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">
</span><span lang="SV" style="font-family:"Courier New"">'wms_srs' 'EPSG:32633 EPSG:3006 EPSG:900913 EPSG:4326'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="SV" style="font-family:"Courier New"">
</span><span style="font-family:"Courier New"">"labelcache_map_edge_buffer" "-10"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> END<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> END<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> VALIDATION<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> "srs" "^[0-9]{4,5)$"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> END<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">############### Layer 0 as WMS request<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> LAYER<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> NAME "WMS-layer-0"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> OFFSITE 200 0 0<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> TYPE RASTER<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> CONNECTIONTYPE WMS<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> CONNECTION "http://localhost/cgi-bin/mapserv?map=/var/www/html/map0.map"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">
</span><span lang="SV" style="font-family:"Courier New"">METADATA<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="SV" style="font-family:"Courier New""> "wms_srs" 'EPSG:''%srs%'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="SV" style="font-family:"Courier New"">
</span><span style="font-family:"Courier New"">"wms_name" "map0"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> "wms_server_version" "1.1.1"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> "wms_format" "image/png"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> "wms_exceptions_format" "application/vnd.ogc.se_inimage"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> END<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> END #layer<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">############### Layer 1 as WMS request<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> LAYER<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> NAME "WMS-layer-1"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> OFFSITE 200 0 0<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> TYPE RASTER<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> CONNECTIONTYPE WMS<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> CONNECTION "http://localhost/cgi-bin/mapserv?map=/var/www/html/map1.map"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">
</span><span lang="SV" style="font-family:"Courier New"">METADATA<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="SV" style="font-family:"Courier New""> "wms_srs" 'EPSG:''%srs%'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="SV" style="font-family:"Courier New"">
</span><span style="font-family:"Courier New"">"wms_name" "map1"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> "wms_server_version" "1.1.1"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> "wms_format" "image/png"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New""> "wms_exceptions_format" "application/vnd.ogc.se_inimage"<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-family:"Courier New"">
</span><span lang="SV" style="font-family:"Courier New"">END<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="SV" style="font-family:"Courier New""> END #layer<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="SV" style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="SV" style="font-family:"Courier New"">END # Map</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Smith, Michael ERDC-RDE-CRREL-NH [mailto:Michael.Smith@erdc.dren.mil]
<br>
<b>Sent:</b> den 6 februari 2015 16:31<br>
<b>To:</b> Schylberg Lars; mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [EXTERNAL] [mapserver-users] WMS SRS as variable<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">Lars,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">A WMS map can support multiple SRS's. Just list all the ones you want in the METADATA block. Look at <a href="http://mapserver.org/ogc/wms_server.html">http://mapserver.org/ogc/wms_server.html</a> and
specifically the Map PROJECTION and wms_srs metadata. From the example, you can see that 2 SRS's are supported.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<div style="mso-element:para-border-div;border:solid #C6C9CB 1.0pt;padding:8.0pt 8.0pt 8.0pt 8.0pt;background:white">
<pre style="mso-margin-top-alt:18.0pt;margin-right:0cm;margin-bottom:18.0pt;margin-left:0cm;line-height:14.4pt;background:white;border:none;padding:0cm;-webkit-box-shadow: rgb(216, 216, 216) 1px 1px 1px;overflow:auto"><span style="font-size:12.5pt;color:#222222"> </span><span class="k"><b><span style="font-size:12.5pt;color:#007020">METADATA</span></b></span><span style="font-size:12.5pt;color:#222222"><o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:18.0pt;margin-right:0cm;margin-bottom:18.0pt;margin-left:0cm;line-height:14.4pt;background:white;border:none;padding:0cm"><span style="font-size:12.5pt;color:#222222"> </span><span class="s"><span style="font-size:12.5pt;color:#4070A0">"wms_title"</span></span><span style="font-size:12.5pt;color:#222222"> </span><span class="s"><span style="font-size:12.5pt;color:#4070A0">"WMS Demo Server"</span></span><span style="font-size:12.5pt;color:#222222"><o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:18.0pt;margin-right:0cm;margin-bottom:18.0pt;margin-left:0cm;line-height:14.4pt;background:white;border:none;padding:0cm"><span style="font-size:12.5pt;color:#222222"> </span><span class="s"><span style="font-size:12.5pt;color:#4070A0">"wms_onlineresource"</span></span><span style="font-size:12.5pt;color:#222222"> </span><span class="s"><span style="font-size:12.5pt;color:#4070A0">"<a href="http://my.host.com/cgi-bin/mapserv?map=wms.map&">http://my.host.com/cgi-bin/mapserv?map=wms.map&</a>"</span></span><span style="font-size:12.5pt;color:#222222"><o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:18.0pt;margin-right:0cm;margin-bottom:18.0pt;margin-left:0cm;line-height:14.4pt;background:white;border:none;padding:0cm"><span style="font-size:12.5pt;color:#222222"> </span><span class="s"><span style="font-size:12.5pt;color:#4070A0">"wms_srs"</span></span><span style="font-size:12.5pt;color:#222222"> </span><span class="s"><span style="font-size:12.5pt;color:#4070A0">"EPSG:4269 EPSG:4326"</span></span><span style="font-size:12.5pt;color:#222222"><o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:18.0pt;margin-right:0cm;margin-bottom:18.0pt;margin-left:0cm;line-height:14.4pt;background:white;border:none;padding:0cm"><span style="font-size:12.5pt;color:#222222"> </span><span class="k"><b><span style="font-size:12.5pt;color:#007020">END</span></b></span><span style="font-size:12.5pt;color:#222222"><o:p></o:p></span></pre>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">Just keep adding to the list to support more projections. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black">Mike<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="color:black">From: </span></b><span style="color:black">Schylberg Lars <<a href="mailto:lars.schylberg@saabgroup.com">lars.schylberg@saabgroup.com</a>><br>
<b>Date: </b>Friday, February 6, 2015 at 10:05 AM<br>
<b>To: </b>"<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>" <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>><br>
<b>Subject: </b>[EXTERNAL] [mapserver-users] WMS SRS as variable<br>
<b>Resent-From: </b>Michael Smith <<a href="mailto:michael.smith@usace.army.mil">michael.smith@usace.army.mil</a>><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:black">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">I wonder if there is a way to set SRS as a variable in a map file.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">I have one map file that uses several other WMS clients that also are mapfiles.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">I would like to use the SRS as variable to make the WMS service more flexible.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">I have tried to do VALIDATION on SRS variable, but that only gives errors.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">Thanks /Lars S.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"> <o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>