[mapserver-users] C# query method

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Fri Jan 29 17:41:50 EST 2010


The queryByAttribute method essentially creates a custom filter (first preserving the old one) and then hands things off to the underlying driver.  For that reason it can't apply the existing filter. All the other methods will honor the existing filter in the same way drawing does. The point, rect or shape filtering happens after the filter is applied by the driver...

Steve

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Murty Maganti
Sent: Friday, January 29, 2010 1:51 PM
To: Lime, Steve D (DNR); Tamas Szekeres
Cc: mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] C# query method

Hi Steve/Tamas

Until now I was under the impression that I can't do a query by attributes and shape in a single call.  Hence I had written my code first to execute query by shape and append those results to query expression as IN clause and invoke queryByAttributes.

While doing some testing on oracle spatial layer, I found that queryByShape is actually honoring filter expression on the layer. Since this will be executed as a single call, I want to modify my code to call only queryByShape and set the query expression to filter.  This will improve overall time taken for the query execution but I want to make sure that his behavior is consistent across all data sets (providers).

Thanks
Murty

From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
Sent: Friday, January 29, 2010 2:27 PM
To: Tamas Szekeres; Murty Maganti
Cc: mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] C# query method

The one notable exception is the queryByAttribute method. It definitely ignores the existing filter.

Steve

From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Tamas Szekeres
Sent: Friday, January 29, 2010 12:32 PM
To: Murty Maganti
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] C# query method

Murty,

It's up to the driver how the filter is actually used, but the query methods should normally use the specified filter setting to limit the shapes retrieved from the data source.

Best regards,

Tamas
2010/1/29 Murty Maganti <MMaganti at oriongis.com<mailto:MMaganti at oriongis.com>>
Hi

I want to know if a layer's filter (set using layerObj.setFilter method) is used while executing any of the query methods on a layer like queryByShape, queryByAttributes, queryByRect etc.

Thanks
Murty

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users

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


More information about the mapserver-users mailing list