<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">+1 from me (to include it)...</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Tamas Szekeres <szekerest@gmail.com><br>
<b>Sent:</b> Monday, April 30, 2018 5:34:09 PM<br>
<b>To:</b> Lime, Steve D (MNIT)<br>
<b>Cc:</b> mapserver-dev@lists.osgeo.org<br>
<b>Subject:</b> Re: [mapserver-dev] Implement getNumFeatures for some drivers</font>
<div> </div>
</div>
<div>
<div dir="ltr">Created a pull request with the suggested changes:
<div><br>
</div>
<div><a href="https://github.com/mapserver/mapserver/pull/5591">https://github.com/mapserver/mapserver/pull/5591</a><br>
</div>
<div><br>
</div>
<div>Keen to have it included in 7.2 if that's sufficient.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">2018-04-28 0:48 GMT+02:00 Lime, Steve D (MNIT) <span dir="ltr">
<<a href="mailto:steve.lime@state.mn.us" target="_blank">steve.lime@state.mn.us</a>></span>:<br>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>A filter is basically a where statement so I think it should be considered...
<hr style="display:inline-block; width:98%">
<div id="x_m_-7547929758317722084divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> mapserver-dev <<a href="mailto:mapserver-dev-bounces@lists.osgeo.org" target="_blank">mapserver-dev-bounces@lists.<wbr>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, April 22, 2018 2:36:44 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] Implement getNumFeatures for some drivers</font>
<div> </div>
</div>
<div>
<div class="x_h5">
<div>
<div dir="ltr">Hi Devs,
<div><br>
</div>
<div>Currently getNumFeatures is supported by the inline layers only. Would that be sufficient to implement this for some other drivers, like  MSSQL, PostGIS and OGR? </div>
<div><br>
</div>
<div>The database drivers would probably rely on the count() aggegate in the SQL query, while we could use  OGR_L_GetFeatureCount for the OGR layers.</div>
<div><br>
</div>
<div>I could also imagine a default implementation if we use whichShapes on the layer extent and iterate the shapes to calculate the count.</div>
<div><br>
</div>
<div>It is also a question whether getNumFeatures should consider the layer filter or not.</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>