1

If I send this request to my geoserver (2.4.4):

http://mygeoserver.de?service=WFS&version=1.0.0&request=GetFeature&typeName=mytype:mylayer&maxFeatures=50

I get an xml document like this:

<wfs:FeatureCollection ...>
<gml:featureMember>....
<mytype:INDEX>0</mytype:INDEX>
</gml:featureMember>
<gml:featureMember>....
<mytype:INDEX>1</mytype:KINDEX>
</gml:featureMember>
<gml:featureMember>....
<mytype:INDEX>0</mytype:KINDEX>
</gml:featureMember>

I want to query my geoserver that I retrieve only those featureMembers that have a certain value in the tag mytype:INDEX, for example all featureMembers with the INDEX 1.

Can I do that and how?

3

You may use Filtering in GeoServer to accomplish this.

The simplest way to do this from your perspective would be to use a cql filter on the end of your request.

e.g. http://mygeoserver.de?service=WFS&version=1.0.0&request=GetFeature&typeName=mytype:mylayer&maxFeatures=50&cql_filter=INDEX=1

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.