<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
A filter is basically a where statement so I think it should be considered...
<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> mapserver-dev <mapserver-dev-bounces@lists.osgeo.org> on behalf of Tamas Szekeres <szekerest@gmail.com><br>
<b>Sent:</b> Sunday, April 22, 2018 2:36:44 PM<br>
<b>To:</b> mapserver-dev@lists.osgeo.org<br>
<b>Subject:</b> [mapserver-dev] Implement getNumFeatures for some drivers</font>
<div> </div>
</div>
<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>
</body>
</html>