[mapserver-users] queryByFeatures not working in 5.6.6?

Bistrais, Bob Bob.Bistrais at maine.gov
Tue Mar 1 15:01:52 EST 2011

I think I've found a workaround.  I actually replaced my queryByFeatures
with a queryByShape.  This works in my application.  But, I'm afraid I
can't explain why the queryByShape is not working for Mathieu.  Maybe
you should try queryByFeatures and see if it works for you!



From: Mathieu Kouri [mailto:mkouri at dbxgeomatics.com] 
Sent: Tuesday, March 01, 2011 2:33 PM
To: Bistrais, Bob; mapserver-users
Subject: RE: [mapserver-users] queryByFeatures not working in 5.6.6?



I would like to mention  that we have been also having problem in using

We were on 5.6.4 and everything was working fine but when updating to
5.6.6 this is no longer seems to be working.




From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Bistrais,
Sent: March-01-11 11:56 AM
To: mapserver-users
Subject: [mapserver-users] queryByFeatures not working in 5.6.6?


We are upgrading our MapServer installation to 5.6.6, and now are
finding a problem with queries that were previously working.


I'm tracing the problem to a queryByFeatures operation.  We are taking a
selected parcel and querying a zoning layer to see what zones are
intersected by the parcel.  We are able to successfully select the
parcel by a queryByAttributes.  We get the shape from the selected
parcel, then attempt a queryByFeatures.  But no results are returned for
the zoning layer.


As I mentioned earlier, this was functioning properly in the previous
version of MapServer.  Is there a change in syntax or something else
that I'm not aware of?



Here is some of the code to perform the query:


-At this point, a parcel has been selected...


// Loop through the results set (there should only be one), get the
shape, and save the

// shape attributes.

for ($i=0; $i<=($oLayer_lurc_parcels->getNumResults() - 1); $i++) {

            $oResult = $oLayer_lurc_parcels->getResult($i);


            $oShape =

            $TPL = $oShape->getValue($oLayer_lurc_parcels,"TPL");

            $_SESSION['results']['TPL'][$_SESSION['nresults']] =




// Perform the intersection; query the zones layer with the parcel
feature.  Again, should

// only be one parcel.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110301/ca93ec87/attachment.html

More information about the mapserver-users mailing list