0
votes

I have published a map service in GeoServer, and there are thousands of features in there. When I generate GeoJSON from Layer Preview with out "maxFeatures=50", the process is getting extremely slow. So I was wondering that if there is a way that I can put some filter in the request url so I can get specifically what I want instead of all features?

For example, I want get features whose name equals to "test", can I make the url:

http://domain.com:8188/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Gistic:V_STRUCTURES_WFS&outputFormat=json&name=test

in order to filter?

If not, is there any other way to do it?

Thanks

2
gis.stackexchange.com/questions/110399/… similar post with the answer.Chetan

2 Answers

0
votes

In the geoserver documentation (section GetFeature) its is stated that you can filter on properties exactly like you suggested with &name=test. If you want to filter on "test" and "rest" you can comma separate the values like this:

&name=test,rest

You can also filter on bbox. If you want more filter options you'll have to do a POST instead of a GET.

0
votes

Try to replace each character ":" by %3A

good luck