<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">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.<br>
<br>
Steve<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF329667"><font color="#000000" face="Tahoma" size="2"><b>From:</b> mapserver-dev-bounces@lists.osgeo.org [mapserver-dev-bounces@lists.osgeo.org] on behalf of Tamas Szekeres [szekerest@gmail.com]<br>
<b>Sent:</b> Sunday, September 16, 2012 3:55 PM<br>
<b>To:</b> mapserver-dev@lists.osgeo.org<br>
<b>Subject:</b> [mapserver-dev] Support for feature querying without spatial filtering<br>
</font><br>
</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>
</body>
</html>