<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Steve, you are absolutely right, according to #2689 i tried commenting<br>out the msLayerWhichItems (layer.i) prior to msLayerWhichShapes in<br>the 5.4 release. The item setup is thus maintained. <br>While i'm afraid to mess with maplayer.c and maybe this will sound silly<br>,i observed that within maplayer.c in function msLayerWhichItems()<br>at line 402, a cleanup of the previous item selections is performed:<br><br>msLayerFreeItemInfo(layer);<br>if(layer-&gt;items) {<br>&nbsp;&nbsp;&nbsp; msFreeCharArray(layer-&gt;items, layer-&gt;numitems);<br>&nbsp;&nbsp;&nbsp; layer-&gt;items = NULL;<br>&nbsp;&nbsp;&nbsp; layer-&gt;numitems = 0;<br>}<br><br>I commented out the whole cleanup and observed that in the whole code<br>below whenever needed (eg if classify is true) the elements subject to a<br>cleanup are just safely overwritten. Moreover, commenting out the cleanup <br>fixes the problem in my humble opinion. <br><br><br>&gt; &gt;&gt;&gt; Steve.Lime@dnr.state.mn.us wrote:<br>&gt; <br>&gt; What does your layer definition look like? Probably stems from the fix<br>&gt; put in<br>&gt; place for ticket #2689 (http://trac.osgeo.org/mapserver/ticket/2689).<br>&gt; That fix<br>&gt; may need more work as I imagine the msLayerWhichItems() is clobbering<br>&gt; the<br>&gt; item setup done when the layer is opened.<br>&gt; <br>&gt; Hmmm, how to fix...<br>&gt; <br>&gt; Steve<br>&gt; <br>&gt; &gt;&gt;&gt; Jim Strevinas &lt;voas_acc@hotmail.com&gt; 04/27/09 8:27 PM &gt;&gt;&gt;<br>&gt; <br>&gt; &gt; Hello list, I recently migrated to 5.4. I observed the following<br>&gt; &gt; inconsistency <br>&gt; &gt; and I would be grateful if someone can duplicate the problem too.<br>&gt; &gt; In my (mapscript python) code i manually grab layer features using:<br>&gt; <br>&gt; &gt; layer.open()<br>&gt; &gt; status = layer.whichShapes(map.extent)<br>&gt; &gt; while (1):<br>&gt; &gt;        shape = layer.nextShape()<br>&gt;        &gt; if shape==None: <br>&gt;                 &gt; break<br>&gt; &gt;        print shape.numvalues<br>&gt; <br>&gt; &gt; The last print returns the number of non-spatial attributes. <br>&gt; &gt;  In mapserver 5.2.1 it is returned correctly but in 5.4 is always 0<br>&gt; &gt; just like all the non spatial values are all null. <br><br><br><br /><hr />Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! <a href='http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us' target='_new'>Try it!</a></body>
</html>