I'm running a GetFeature WFS query in GeoServer (looking for features within a polygon) but all I actually want is the total number of features. Is there a way of just returning this info (in the hope that the query will run a little faster) rather than all the records?
The query is returning over 10,000 features so I hope it would make a difference if possible.
Best Answer
You can set the parameter resultType to "hits" and you will get the number of features in the query similar to the count() function in SQL.
HTTP Get request example:
HTTP Post request example with a filter: