How to find an feature in WFS by filter?

353 Views Asked by At

I try to find feature by id and layer id by WFS:

const cql_filter = "&cql_filter=(id=layer202103_geom.42)";

Request looks like:

service: WFS
version: 1.0.0
request: GetFeature
typeName: layer20_geom
outputFormat: json
cql_filter: (id=layer20_geom.42)

It returns me an error:

<?xml version="1.0" ?>
<ServiceExceptionReport
   version="1.2.0"
   xmlns="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
   <ServiceException>
      Could not parse CQL filter list.
Encountered &quot;id =&quot; at line 1, column 2.
Was expecting one of:
    &lt;NOT&gt; ...
    &quot;include&quot; ...

My full geojson looks:

{"type":"FeatureCollection","features":[{"type":"Feature","id":"layer2_geom.42","geometry":{"type":"Po...
0

There are 0 best solutions below