<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
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;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@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="NL" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi all, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m drawing layers based on GRIB data files. Each file contains several bands (datasets). I can access these datasets by setting the PROCESSING attribute on the LAYER object. As in this example:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#########################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">LAYER<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NAME "current_grid"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> TYPE POINT<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CONNECTIONTYPE uvraster<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> DATA "/var/www/mapserver/data/grib/routeguard/4nwwin99_2013110412.grb2" #v and u-component of current<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> PROCESSING "BANDS=1,2"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> PROCESSING "UV_SPACING=20"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CLASS<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> STYLE<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> SYMBOL "arrow"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> ANGLE [uv_angle]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> SIZE [uv_length]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> COLOR 255 0 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END # style<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END # class<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> PROJECTION<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> #"init=epsg:4326"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +pm=-360"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">END # layer<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This works fine. But I need to set the PROCESSING values dynamically through mapscript. If I add this code to my script (which works fine without these lines):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $map = ms_newMapObj($_GET['MAP']);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $current_layer = $map->getlayerbyname('current_grid');
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> // both of these do not work<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> //$current_layer->set('processing', 'BANDS=1,2'));<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> //$current_layer->setprocessing('BANDS=1,2'));<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $request = createRequest("");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $result = $map->owsdispatch($request);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I get an internal server error (500). It seems that setting any attribute via the layer->set() method causes this behavior. I’m migrating from MS 5.4, does the set method still work as expected?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jorrit Goddijn<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">jorrit.goddijn@meteogroup.com<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">MeteoGroup <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>