I am trying to do a WFS POST request to https://environment.data.gov.uk/spatialdata/crow-act-2000-section-4-conclusive-registered-common-land-england/wfs where I need to send a list of polygons and find out if any of them are intersecting with the layers found on the endpoint.
I have done the GetCapabilities check so I know that it can accept gml:Polygon
.
This is my request body so far:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wfs:GetFeature maxFeatures="5000" version="1.1.0" service="WFS" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" resultType="hits" xmlns:fes="http://www.opengis.net/fes/2.0">
<wfs:Query typeName="ms:Crow_Act_2000_Section_4_Conclusive_Registered_Common_Land_England">
<ogc:Filter>
<ogc:Or>
<ogc:Intersects>
<ogc:PropertyName>SHAPE</ogc:PropertyName>
<gml:Polygon srsName="urn:ogc:def:crs:EPSG::27700">
<gml:exterior>
<gml:LinearRing>
<gml:posList>352722 488465 505172 482115 558353 140008 304353 111433 352722 488465</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</ogc:Intersects>
<ogc:Intersects>
<ogc:PropertyName>SHAPE</ogc:PropertyName>
<gml:Polygon srsName="urn:ogc:def:crs:EPSG::27700">
<gml:exterior>
<gml:LinearRing>
<gml:posList>289146 331504 289148 331824 289535 331814 289516 331502 289146 331504</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</ogc:Intersects>
</ogc:Or>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
And the error that I get back looks like this:
<ExceptionReport
version="2.0.0" xmlns="http://www.opengis.net/ows/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsAll.xsd"
>
<Exception exceptionCode="OperationProcessingFailed">
<ExceptionText>
<![CDATA[Operator 'Or' : operand is wrong.]]>
</ExceptionText>
</Exception>
<Exception exceptionCode="OperationProcessingFailed">
<ExceptionText>
<![CDATA[Operator 'Intersects' can only be one per filter request.]]>
</ExceptionText>
</Exception>
<Exception exceptionCode="OperationProcessingFailed">
<ExceptionText>
<![CDATA[Operator 'Or' : operand is wrong.]]>
</ExceptionText>
</Exception>
<Exception exceptionCode="OperationProcessingFailed">
<ExceptionText>
<![CDATA[Unknown system error.]]>
</ExceptionText>
</Exception>
</ExceptionReport>
I am not sure why it is having a problem with the ogc:Or
, as this same request body works for a different endpoint (https://datamap.gov.wales/geoserver/wfs) though this other request body does have a different typeName
and PropertyName
.
Would anyone be able to point me in the right direction to why it is not working with the multiple polygons on an Intersects filter query?
ms
prefix for the featureTypexmlns:ms="https://environment.data.gov.uk/spatialdata/crow-act-2000-section-4-conclusive-registered-common-land-england/wfs"
the second issue is the validator tells me that the typename attribute value isn't valid! ~is not facet-valid with respect to pattern '((\w:)?\w(=\w)?){1,}' for type 'TypeNameListType'.