[Geoserver-users] count of features

All,

Is there a way in Geoserver to request just the number of features that
match a certain query? Is there a filter or function that would match this
SQL:

SELECT count(*) FROM feature_table WHERE name='Steve' (or state='Alaska',
etc)

Thanks,
Steve

Yes, you can set resultType="hits" as an attribute of the wfs:GetFeature element in your request XML. I believe this is only available in WFS 1.1.

Hope this helps,
-David Winslow

Stephen Crawford wrote:

All,

Is there a way in Geoserver to request just the number of features that
match a certain query? Is there a filter or function that would match this
SQL:

SELECT count(*) FROM feature_table WHERE name='Steve' (or state='Alaska',
etc)

Thanks,
Steve

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4040,48888fa815605210051143!

Yes, you can set resultType="hits" as an attribute of the wfs:GetFeature
element in your request XML. I believe this is only available in WFS 1.1.

Hope this helps,
-David Winslow

Stephen Crawford wrote:

All,

Is there a way in Geoserver to request just the number of features that
match a certain query? Is there a filter or function that would match this
SQL:

SELECT count(*) FROM feature_table WHERE name='Steve' (or state='Alaska',
etc)

Thanks,
Steve

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4040,48888fa815605210051143!