<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->items) {<br>    msFreeCharArray(layer->items, layer->numitems);<br>    layer->items = NULL;<br>    layer->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>> >>> Steve.Lime@dnr.state.mn.us wrote:<br>> <br>> What does your layer definition look like? Probably stems from the fix<br>> put in<br>> place for ticket #2689 (http://trac.osgeo.org/mapserver/ticket/2689).<br>> That fix<br>> may need more work as I imagine the msLayerWhichItems() is clobbering<br>> the<br>> item setup done when the layer is opened.<br>> <br>> Hmmm, how to fix...<br>> <br>> Steve<br>> <br>> >>> Jim Strevinas <voas_acc@hotmail.com> 04/27/09 8:27 PM >>><br>> <br>> > Hello list, I recently migrated to 5.4. I observed the following<br>> > inconsistency <br>> > and I would be grateful if someone can duplicate the problem too.<br>> > In my (mapscript python) code i manually grab layer features using:<br>> <br>> > layer.open()<br>> > status = layer.whichShapes(map.extent)<br>> > while (1):<br>> >        shape = layer.nextShape()<br>>        > if shape==None: <br>>                 > break<br>> >        print shape.numvalues<br>> <br>> > The last print returns the number of non-spatial attributes. <br>> >  In mapserver 5.2.1 it is returned correctly but in 5.4 is always 0<br>> > 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>