[MS4W-Users] [mapserver-dev] Re: MS4W Beta 7 -- Python-Mapscript -- queryByRect strange behavior

Daniel Morissette dmorissette at mapgears.com
Mon Nov 9 14:46:11 EST 2009

Christian Jauvin wrote:
> if succ == MS_SUCCESS:
>     n_res = layer.getNumResults()
>     for j in range(n_res):
>         res = layer.getResult(j)
>         shp = layer.getFeature(res.shapeindex)
>         features.append(shp)

Note that starting with MapServer 5.6, when reading shapes out of a 
resultset, you should use the new layer.resultsGetShape() method instead 
of layer.getShape() or layer.getFeature().

Your script creates and queries inline features, and in this case the 
old method still works, but for PostGIS, Oracle and SDE data sources 
that is an important change to make.

More info in the 5.6 migration guide (draft) at

Daniel Morissette

More information about the MS4W-Users mailing list