<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="gmail_extra"><br><div class="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="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="m_-7547929758317722084divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><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="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>