[mapserver-dev] Support for feature querying without spatial filtering

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Sun Sep 16 14:46:30 PDT 2012


I agree there's a need for what you're proposing. What would things look like from the MapScript API side of things? Presumably we'd need to update the queryObj to hold query options and then update queryByAttributes to take a flag of some sort.

Steve

________________________________
From: mapserver-dev-bounces at lists.osgeo.org [mapserver-dev-bounces at lists.osgeo.org] on behalf of Tamas Szekeres [szekerest at gmail.com]
Sent: Sunday, September 16, 2012 3:55 PM
To: mapserver-dev at lists.osgeo.org
Subject: [mapserver-dev] Support for feature querying without spatial filtering

Hi Devs,

I'd like to establish support for querying the shapes without a spatial filter. The query would be initiated from the mapscript interface, but I would prefer to notify the driver not to use the spatial filter in some cases.

The most compelling reasons to implement such change are:

1. When using an attribute query or a filter expression query, we don't know or don't want to specify a search rectangle.
2. We can experience a performance increment (especially for the database drivers) by reducing the complexity of the query execution plan.

The most straightforward implementation would be to modify the parameters of whichShapes from:

int msLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)

to:

int msLayerWhichShapes(layerObj *layer, rectObj rect, int options)

we could use constant values for options such as:

#define MS_QUERYOPT_ISQUERY  0x01
#define MS_QUERYOPT_NONSPATIAL  0x02

Drivers should take care of using MS_QUERYOPT_NONSPATIAL. In the first turn, I'd like to implement using this for mssql2008 specifically.

Let me know what you think.


Best regards,

Tamas


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20120916/31315082/attachment.html>


More information about the mapserver-dev mailing list