0

I am using GeoExt, GeoServer, and PostgreSQL 8.2. I have a shapefile of trees and want to show the total number of trees to the user...

Is there any feature in GeoExt like feature count which can make my work easy such as a distance and area calculation actions in a tool bar?

1

You can use GetFeature request of WFS v.1.1.0 with parameter resulttype=hits. See the following example about the request and response.

http://demo.opengeo.org/geoserver/wfs?service=wfs&version=1.1.0&request=getfeature&typename=topp:states&resulttype=hits

<wfs:FeatureCollection numberOfFeatures="49" 
timeStamp="2014-11-25T07:45:30.109Z" 
xsi:schemaLocation="http://www.opengis.net/wfs 
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"/>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.