0

I am considering using Common Query Language (CQL) to add filter parameter to a HTTP curl query which runs against a WFS server. I found out that GeoServer supports CQL via WFS.

  1. Can I tell from a GetCapabilities document if the WFS is served by GeoServer?
  2. How can I test if CQL is supported by the WFS?
1

I do not believe there is anything that for sure reveals that WFS server is GeoServer but with standard settings the schema location refers somehow to geoserver and some supported functions are special for GeoServer. However, others can implement functions using same names:

http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=GetCapabilities

<wfs:WFS_Capabilities version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd" updateSequence="96">

<ogc:FunctionName nArgs="-6">BarnesSurface</ogc:FunctionName>

For testing is CQL_FILTER is supported you can try the "IN" filter as in http://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html

The following request will return one feature from GeoServer and probably all features from other servers (or an error). You must edit "states.1" to suit with the name of the featuretype:

http://localhost:8080/geoserver/ows?service=wfs&version=1.1.0&request=GetFeature&typename=topp:states&CQL_FILTER=IN ('states.1')
  • Thank you. I received the same file as if I omit the CQL_FILTER parameters. I also urlencoded the last part of the URL. So, the WFS server seems to not support CQL. – JJD Jul 8 '15 at 21:55

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.