Vanuit een zoekformulier dat jaren goed werkte met versies < v4 voor de Kadastralekaart heb ik nu een probleem waar ik niet meteen uitkom. Het zoekformulier, waarin Kadastrale gemeente, sectie en perceelnummer ingevuld kan worden, evt met wildcards, genereert een Filter waarmee de WFS bevraagd wordt. De WFS URL is https://geodata.nationaalgeoregister.nl/kadastralekaart/wfs/v4_0. Bijvoorbeeld:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="GML3"
maxFeatures="1000" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="feature:perceel" srsName="EPSG:28992"
xmlns:feature="http://kadastralekaartv4.geonovum.nl">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And>
<ogc:PropertyIsEqualTo matchCase="true">
<ogc:PropertyName>kadastraleGemeenteCode</ogc:PropertyName>
<ogc:Literal>ABG00</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo matchCase="true">
<ogc:PropertyName>sectie</ogc:PropertyName>
<ogc:Literal>F</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsLike matchCase="true" wildCard="*" singleChar="." escapeChar="!">
<ogc:PropertyName>perceelnummer</ogc:PropertyName>
<ogc:Literal>**2*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Na ongeveer 30 seconden krijg ik volgende antwoord:
<?xml version='1.0' encoding="UTF-8" ?>
<wfs:FeatureCollection
xmlns:kadastralekaartv4="http://kadastralekaartv4.geonovum.nl"
xmlns:gml="http://www.opengis.net/gml"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://kadastralekaartv4.geonovum.nl https://geodata.nationaalgeoregister.nl/kadastralekaart/wfs/v4_0?SERVICE=WFS&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=feature:perceel&OUTPUTFORMAT=SFE_XMLSCHEMA http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<gml:boundedBy>
<gml:Null>missing</gml:Null>
</gml:boundedBy>
</wfs:FeatureCollection>
In een REST client wat varianten geprobeerd, door Filter elementen weg te laten. In verleden was er bijv een probleem met matchCase en wildCards. Maar zelfs een heel kale Request body als:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="GML3"
maxFeatures="1000" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="feature:perceel" srsName="EPSG:28992"
xmlns:feature="http://kadastralekaartv4.geonovum.nl">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>kadastraleGemeenteCode</ogc:PropertyName>
<ogc:Literal>ABG00</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>sectie</ogc:PropertyName>
<ogc:Literal>F</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
krijg ik zelfde response.
Alleen bij volledig weglaten Filter krijg ik een FeatureCollection terug:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="GML3"
maxFeatures="1000" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="feature:perceel" srsName="EPSG:28992"
xmlns:feature="http://kadastralekaartv4.geonovum.nl">
</wfs:Query>
</wfs:GetFeature>
Die gml:Null
lijkt wordt vaker gezien in MapServer, e.g. OpenLayers / Mapserver WFS Filter: <gml:null>missing</gml:null> - Geographic Information Systems Stack Exchange
maar heb niet zelfde probleem teruggevonden. Ik zie niets verkeerd in mijn Filter Encoding, maar kan iets over hoofd hebben gezien, of is er gewoon een timeout na 30 seconden?
Aanvulling: de response komt altijd na plm 30 seconden. Als ik vreemd genoeg een exacte request doe zoals:
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="GML3" maxFeatures="1000" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="feature:perceel" srsName="EPSG:28992" xmlns:feature="http://kadastralekaartv4.geonovum.nl">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>kadastraleGemeenteCode</ogc:PropertyName>
<ogc:Literal>OTL02</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>sectie</ogc:PropertyName>
<ogc:Literal>B</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>perceelnummer</ogc:PropertyName>
<ogc:Literal>2436</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
komt de <gml:Null>missing</gml:Null>
response direct terug.