<div>Steve,</div><div><br></div><div>I was thinking about this also. But with some coordinate systems<font face="Tahoma"> (-1,-1,-1,-1) may specify a valid point location (which can eventually be used as the spatial filter).</font></div>
<div><font face="Tahoma">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.</font></div>
<div><font face="Tahoma"><br></font></div><div><font face="Tahoma">Best regards,</font></div><div><font face="Tahoma"><br></font></div><div><font face="Tahoma">Tamas</font></div><div><font face="Tahoma"><br></font></div><div>
<font face="Tahoma"><br></font></div><div><br></div><br><br><div class="gmail_quote">2012/9/17 Lime, Steve D (DNR) <span dir="ltr"><<a href="mailto:Steve.Lime@state.mn.us" target="_blank">Steve.Lime@state.mn.us</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">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<br>
<br>
<div style="font-size:16px;font-family:Times New Roman"><div>
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> <a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a> [<a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.osgeo.org</a>] on behalf of Tamas Szekeres [<a href="mailto:szekerest@gmail.com" target="_blank">szekerest@gmail.com</a>]<br>
<b>Sent:</b> Sunday, September 16, 2012 3:55 PM<br>
<b>To:</b> <a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<b>Subject:</b> [mapserver-dev] Support for feature querying without spatial filtering<br>
</font><br>
</div>
<div></div>
</div><div><div><div>Hi Devs,
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>The most compelling reasons to implement such change are:</div>
<div><br>
</div>
<div>1. When using an attribute query or a filter expression query, we don't know or don't want to specify a search rectangle.</div>
<div>2. We can experience a performance increment (especially for the database drivers) by reducing the complexity of the query execution plan.</div>
<div><br>
</div>
<div>The most straightforward implementation would be to modify the parameters of whichShapes from:</div>
<div><br>
</div>
<div>int msLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)</div>
<div><br>
</div>
<div>to:</div>
<div><br>
</div>
<div>int msLayerWhichShapes(layerObj *layer, rectObj rect, int options)</div>
<div><br>
</div>
<div>we could use constant values for options such as:</div>
<div><br>
</div>
<div>
<div>#define MS_QUERYOPT_ISQUERY 0x01</div>
<div>#define MS_QUERYOPT_NONSPATIAL 0x02</div>
</div>
<div><br>
</div>
<div>Drivers should take care of using MS_QUERYOPT_NONSPATIAL. In the first turn, I'd like to implement using this for mssql2008 specifically.</div>
<div><br>
</div>
<div>Let me know what you think.</div>
<div><br>
</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div></div></div>
</div>
</div>
</blockquote></div><br>