<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hello list, I recently migrated to 5.4. I observed the following 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shape = layer.nextShape()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if shape==None: <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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. One could also<br>observer that:<br><br>layer.open()<br>print layer.numitems&nbsp;&nbsp; # Return the right value always<br>
status = layer.whichShapes(map.extent)<br>print layer.numitems&nbsp;&nbsp; # Returns 0 ONLY in 5.4<br><br>My workaround now is to temporary store the whichShapes() returned<br>features' indexes in a list and later access using layer.getFeature(i) which preserves<br>the existance of non-spatial. I don;t know yet if this problem arised only<br>for me, but i thought it would be wise to inform.<br><br><br /><hr />What can you do with the new Windows Live? <a href='http://www.microsoft.com/windows/windowslive/default.aspx' target='_new'>Find out</a></body>
</html>