[MS4W-Users] [mapserver-dev] Re: MS4W Beta 7 -- Python-Mapscript -- queryByRect strange behavior
cjauvin at gmail.com
Mon Nov 9 17:59:18 EST 2009
Thanks for the note: of course I ran into the issue a little bit later
(I simply had not reached yet the part of my program that deals with
PostGIS layers), and I was quite happy to be aware of that!
Now I really tried to figure how to upgrade my < 5.6 code with the new
query mechanism that you added in 5.6, but (1) I couldn't find enough
documentation/example about the issue (I understand it is pretty new)
and (2) couldn't make enough sense of what I read in the MS 5.6 C
source that I downloaded. I cannot even figure out the exact arguments
to the method (as they are not explictly stated in the SWIG generated
If you would have time to provide a little example showing how it
works, it would be greatly appreciated!
On Mon, Nov 9, 2009 at 2:46 PM, Daniel Morissette
<dmorissette at mapgears.com> wrote:
> 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)
> 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
> MS4W-Users mailing list
> MS4W-Users at lists.maptools.org
More information about the MS4W-Users