<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 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 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;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-NZ" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi List,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For quite a few days I am now stuck on this problem, and since I haven’t found it with searching the web, here a question:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We have a relatively complex setup here. 2 MapServer versions. One is the standard 5.6.6 and the other one, we got a SVN snapshot:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">$ svn info<o:p></o:p></p>
<p class="MsoNormal">Path: .<o:p></o:p></p>
<p class="MsoNormal">URL: https://svn.osgeo.org/mapserver/trunk/mapserver<o:p></o:p></p>
<p class="MsoNormal">Repository Root: https://svn.osgeo.org/mapserver<o:p></o:p></p>
<p class="MsoNormal">Repository UUID: 7532c77e-422f-0410-93f4-f0b67bdd69e2<o:p></o:p></p>
<p class="MsoNormal">Revision: 10907<o:p></o:p></p>
<p class="MsoNormal">Node Kind: directory<o:p></o:p></p>
<p class="MsoNormal">Schedule: normal<o:p></o:p></p>
<p class="MsoNormal">Last Changed Author: tbonfort<o:p></o:p></p>
<p class="MsoNormal">Last Changed Rev: 10907<o:p></o:p></p>
<p class="MsoNormal">Last Changed Date: 2011-01-26 06:07:46 +1300 (Wed, 26 Jan 2011)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We use the “normal” release version for our mapping application in the browser and the “SVN” version for printing SVG output. We decided to do it this way, because that is how we got the best looking maps with help of the MapFish print
module.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We have 2 map files (more but irrelevant for this), one for the base map and one for science data. In both we have this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">IMAGETYPE png<o:p></o:p></p>
<p class="MsoNormal">#...<o:p></o:p></p>
<p class="MsoNormal">OUTPUTFORMAT<o:p></o:p></p>
<p class="MsoNormal"> NAME "aggpng24"<o:p></o:p></p>
<p class="MsoNormal"> DRIVER AGG/PNG<o:p></o:p></p>
<p class="MsoNormal"> MIMETYPE "image/png"<o:p></o:p></p>
<p class="MsoNormal"> IMAGEMODE RGB<o:p></o:p></p>
<p class="MsoNormal"> EXTENSION "png"<o:p></o:p></p>
<p class="MsoNormal"> FORMATOPTION "INTERLACE=OFF"<o:p></o:p></p>
<p class="MsoNormal">END<o:p></o:p></p>
<p class="MsoNormal">OUTPUTFORMAT<o:p></o:p></p>
<p class="MsoNormal"> NAME svg<o:p></o:p></p>
<p class="MsoNormal"> MIMETYPE "image/svg+xml"<o:p></o:p></p>
<p class="MsoNormal"> DRIVER CAIRO/SVG<o:p></o:p></p>
<p class="MsoNormal"> #FORMATOPTION "COMPRESSED_OUTPUT=TRUE"<o:p></o:p></p>
<p class="MsoNormal"> FORMATOPTION "FULL_RESOLUTION=TRUE"<o:p></o:p></p>
<p class="MsoNormal">END<o:p></o:p></p>
<p class="MsoNormal">#...<o:p></o:p></p>
<p class="MsoNormal">WEB<o:p></o:p></p>
<p class="MsoNormal"> IMAGEPATH "/var/www/tmp/"<o:p></o:p></p>
<p class="MsoNormal"> IMAGEURL "/tmp/"<o:p></o:p></p>
<p class="MsoNormal">END<o:p></o:p></p>
<p class="MsoNormal"># layer definitions<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Our requests look like this:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://ourwmsserver/cgi-bin/mapserv.svn?BBOX=175.90352%2C-38.04814%2C176.34756%2C-37.560966&HEIGHT=1024&WIDTH=933&map_resolution=72&CLASS=1%2C2%2C3%2C4%2C6%2C7%2C8&SERVICE=WMS&REQUEST=GetMap&MAP=%2Fopt%2Fmapserver%2Fmapfiles%2Flri.map&TRANSPARENT=true&VERSION=1.1.1&FORMAT=image%2Fsvg%2Bxml&format_options=dpi%3A72&LAYERS=luc_main&SRS=EPSG%3A4326">http://ourwmsserver/cgi-bin/mapserv.svn?BBOX=175.90352%2C-38.04814%2C176.34756%2C-37.560966&HEIGHT=1024&WIDTH=933&map_resolution=72&CLASS=1%2C2%2C3%2C4%2C6%2C7%2C8&SERVICE=WMS&REQUEST=GetMap&MAP=%2Fopt%2Fmapserver%2Fmapfiles%2Flri.map&TRANSPARENT=true&VERSION=1.1.1&FORMAT=image%2Fsvg%2Bxml&format_options=dpi%3A72&LAYERS=luc_main&SRS=EPSG%3A4326</a><o:p></o:p></p>
<p class="MsoNormal">Result: SVG XML<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a href="http://ourwmsserver/cgi-bin/mapserv.svn?BBOX=175.90352%2C-38.04814%2C176.34756%2C-37.560966&HEIGHT=1024&WIDTH=933&TRANSPARENT=true&map_resolution=72&VERSION=1.1.1&FORMAT=image%2Fsvg%2Bxml&SERVICE=WMS&map=%2Fopt%2Fmapserver%2Fmapfiles%2Fscenz_topo_new.map&format_options=dpi%3A72&LAYERS=coastpoly&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326">http://ourwmsserver/cgi-bin/mapserv.svn?BBOX=175.90352%2C-38.04814%2C176.34756%2C-37.560966&HEIGHT=1024&WIDTH=933&TRANSPARENT=true&map_resolution=72&VERSION=1.1.1&FORMAT=image%2Fsvg%2Bxml&SERVICE=WMS&map=%2Fopt%2Fmapserver%2Fmapfiles%2Fscenz_topo_new.map&format_options=dpi%3A72&LAYERS=coastpoly&REQUEST=GetMap&STYLES=&SRS=EPSG%3A4326</a><o:p></o:p></p>
<p class="MsoNormal">Result: PNG image<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We would like to get SVG output in both cases. The funny thing is that we’re using the same MapServer instance, there are no errors reported and in one case we get SVG output (as desired) and in the other case we get a PNG with every request.
If we however request a JPG in that case, we get an error. I also looked at the GetCapabilities output and found image/svg+xml there, but it does not output that for us.<o:p></o:p></p>
<p class="MsoNormal">Another thing I’ve tried is to change to<br>
OUTPUTFORMAT svg<br>
in which case we always get an SVG, even when requesting a PNG. A solution for us could be to define 2 .map files for each layer, but that would be a maintenance nightmare with the amount of .map files we have already. Also, it seems sensible to me that multiple
OUTPUTFORMATs are allowed and it should really work.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I realise, that the “SVN” version we are using might not be totally bug free. The problem is though, that our map files do not work with the MapServer 6.0 beta 5 version, because there were a lot of changes in the way map files are handled
in version 6.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We need to get this working ASAP, so any help or comments are greatly appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kind regards,<o:p></o:p></p>
<p class="MsoNormal">Tim-Hinnerk Heuer<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Landcare Research, Palmerston North<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<hr>
<font face="Arial" color="Green" size="1">Please consider the environment before printing this email<br>
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.<br>
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz<br>
</font>
</body>
</html>