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

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Mon Sep 17 05:19:04 PDT 2012


I know the shapefile driver does the test you mention. If true it sets the bit array (its layerInfoObj) to all 1's and processes as normal.

Steve

________________________________
From: Tamas Szekeres [szekerest at gmail.com]
Sent: Monday, September 17, 2012 5:40 AM
To: Lime, Steve D (DNR)
Cc: mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] Support for feature querying without spatial filtering

Steve,

I was thinking about this also. But with some coordinate systems (-1,-1,-1,-1) may specify a valid point location (which can eventually be used as the spatial filter).
But thinking this further, the drivers may test whether the specified rectangle is equal with (or contains entirely) the spatial extent of the layer and omit including the spatfilter in the query statement in such cases. I'll see how this can work with mssql2008.

Best regards,

Tamas





2012/9/17 Lime, Steve D (DNR) <Steve.Lime at state.mn.us<mailto:Steve.Lime at state.mn.us>>
Another idea I wondered about is if we could simply use a certain degenerate rectangle (-1,-1,-1,-1) or something like that to trigger this behavior. That would require no modification of the main msLayerWhichShapes() function. Drivers would have to be tweaked. One benefit is that users could trigger this via CGI too.  --Steve

________________________________
From: mapserver-dev-bounces at lists.osgeo.org<mailto:mapserver-dev-bounces at lists.osgeo.org> [mapserver-dev-bounces at lists.osgeo.org<mailto:mapserver-dev-bounces at lists.osgeo.org>] on behalf of Tamas Szekeres [szekerest at gmail.com<mailto:szekerest at gmail.com>]
Sent: Sunday, September 16, 2012 3:55 PM
To: mapserver-dev at lists.osgeo.org<mailto: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/20120917/1aff0f3d/attachment.html>


More information about the mapserver-dev mailing list