<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to construct a WFS-URL that both filters on an attribute and uses a boudingbox filter in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-construct-a-wfs-url-that-both-filters-on-an/m-p/328006#M30291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Together with my colleague Gert-Jan van Weijden I found a solution for combining a spatial filter and an attribute filter in a WFS-request. As expected this only works when integrating both query-expressions within the filter-statement, as these criteria rule eachother out otherwise: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After extensive experimenting with formulating ogc-compliant requests, Gert-Jan pointed out the option of using a much more straightforward CQL-filter, which is an extension on Geoserver. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Using the cql-approach worked fine when combining a bounding box with an attribute filter for: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs" rel="nofollow" target="_blank"&gt;http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs&lt;/A&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full successful request (which as intended renders only the municipality of Almere and not Breda, because only Almere lies within de defined bounding box):&lt;/P&gt;&lt;P&gt;&lt;A href="http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs?SERVICE=WFS&amp;amp;VERSION=2.0.0&amp;amp;REQUEST=GetFeature&amp;amp;TYPENAME=bestuurlijkegrenzen:gemeenten&amp;amp;SRSNAME=EPSG:28992&amp;amp;cql_filter=(bbox(geom,100000,450000,200000,500000,%27EPSG:28992%27)and((gemeentenaam=%27Almere%27)or(gemeentenaam=%27Breda%27)))" title="http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs?SERVICE=WFS&amp;amp;amp;VERSION=2.0.0&amp;amp;amp;REQUEST=GetFeature&amp;amp;amp;TYPENAME=bestuurlijkegrenzen:gemeenten&amp;amp;amp;SRSNAME=EPSG:28992&amp;amp;amp;cql_filter=(bbox(geom,100000,450000,200000,500000,%27EPSG:28992%27)an"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: Arial; background: white;"&gt;http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs?SERVICE=WFS&amp;amp;VERSION=2.0.0&amp;amp;REQUEST=GetFeature&amp;amp;TYPENAME=bestuurlijkegrenzen:gemeenten&amp;amp;SRSNAME=EPSG:28992&amp;amp;cql_filter=(bbox(geom,100000,450000,200000,500000,%27EPSG:28992%27)and((gemeentenaam=%27Almere%27)or(gemeentenaam=%27Breda%27)))&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However using the same formula for the &lt;A _jive_internal="true" href="https://community.esri.com/message/WFS http:/geodata.nationaalgeoregister.nl/bag/wfs"&gt;BAG&lt;/A&gt;-WFS, wasn’t directly successful. As it turned out “geom.”&amp;nbsp; - from the URL above - refers to the property name of the geometry-field (and should do so). Since the geometry-field of the BAG-WFS is “geometrie” , “geom” should be replaced here for “geometrie”. Having made this substitution renders the following successful request for the BAG-WFS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Arial; color: #003366; background: white;"&gt;&lt;A class="jive-link-external-small" href="http://geodata.nationaalgeoregister.nl/bag/wfs?REQUEST=GetFeature&amp;amp;SERVICE=WFS&amp;amp;VERSION=2.0.0&amp;amp;TYPENAME=bag:pand&amp;amp;SRSNAME=EPSG:28992&amp;amp;cql_filter=(bbox(geometrie" rel="nofollow" target="_blank"&gt;http://geodata.nationaalgeoregister.nl/bag/wfs?REQUEST=GetFeature&amp;amp;SERVICE=WFS&amp;amp;VERSION=2.0.0&amp;amp;TYPENAME=bag:pand&amp;amp;SRSNAME=EPSG:28992&amp;amp;cql_filter=(bbox(geometrie&lt;/A&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;107240,507000,109000,509000,%27EPSG:28992%27)and(status=%27Bouwvergunning verleend%27))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Feb 2015 21:36:50 GMT</pubDate>
    <dc:creator>basboers1</dc:creator>
    <dc:date>2015-02-25T21:36:50Z</dc:date>
    <item>
      <title>How to construct a WFS-URL that both filters on an attribute and uses a boudingbox filter</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-construct-a-wfs-url-that-both-filters-on-an/m-p/328005#M30290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear community, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In an attempt not to request too many features from a WFS i'd like to apply both a attribute filter and a bounding box/envelope. Although these two types of filters seem to be "mutually exclusive" according to the OGC specification, I was wondering if they could somehow be combined within a single filter through for example the use of the AND-operator. Anyone any advise? I am working on the following WFS: &lt;SPAN style="color: #535353; font-family: Verdana, Arial, sans-serif; font-size: 11px;"&gt;&lt;A class="jive-link-external-small" href="http://geodata.nationaalgeoregister.nl/bag/wfs?request=getcapabilities" rel="nofollow" target="_blank"&gt;http://geodata.nationaalgeoregister.nl/bag/wfs?request=getcapabilities&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;What I've tried, but doesn't work out is: &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;1:Via the url&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman', serif;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;A class="jive-link-external-small" href="http://geodata.nationaalgeoregister.nl/bag/wfs?&amp;amp;typename=bag:pand&amp;amp;version=2.0.0&amp;amp;request=getfeature&amp;amp;Filter=%3cogc:Filter" rel="nofollow" target="_blank"&gt;http://geodata.nationaalgeoregister.nl/bag/wfs?&amp;amp;typename=bag:pand&amp;amp;version=2.0.0&amp;amp;request=getfeature&amp;amp;Filter=&amp;lt;ogc:Filter&lt;/A&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&lt;SPAN&gt;xmlns=&amp;amp;quot;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.opengis.net/wfs/2.0" rel="nofollow" target="_blank"&gt;http://www.opengis.net/wfs/2.0&lt;/A&gt;&lt;SPAN&gt; xmlns:gml=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.opengis.net/gml" rel="nofollow" target="_blank"&gt;http://schemas.opengis.net/gml&lt;/A&gt;&lt;SPAN&gt; xmlns:xsi=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow" target="_blank"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt; xmlns:bag=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://bag.geonovum.nl" rel="nofollow" target="_blank"&gt;http://bag.geonovum.nl&lt;/A&gt;&lt;SPAN&gt; xsi:schemaLocation=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.opengis.net/wfs/2.0" rel="nofollow" target="_blank"&gt;http://www.opengis.net/wfs/2.0&lt;/A&gt;&lt;SPAN&gt; &amp;amp;quot;&amp;gt;&amp;lt;And&amp;gt;&amp;lt;ogc:&lt;/SPAN&gt;&lt;SPAN class="currentHitHighlight" style="color: #ffffff; background-color: #d82300;"&gt;BBOX&lt;/SPAN&gt;&amp;gt;&amp;lt;ogc:PropertyName&amp;gt;Shape&amp;lt;/ogc:PropertyName&amp;gt;&amp;lt;gml:Box srsName=&amp;amp;quot;urn:x-ogc:def:crs:EPSG:28992&amp;amp;quot;&amp;gt;&amp;lt;gml:coordinates&amp;gt;508576,107240 510167,109000&amp;lt;/gml:coordinates&amp;gt;&amp;lt;/gml:Box&amp;gt;&amp;lt;/ogc:&lt;SPAN class="highlight" style="background-color: #ffee94;"&gt;BBOX&lt;/SPAN&gt;&amp;gt;&amp;lt;Within&amp;gt;&amp;lt;PropertyIsEqualTo&amp;gt;&amp;lt;PropertyName&amp;gt;status&amp;lt;/PropertyName&amp;gt;&amp;lt;Literal&amp;gt;Bouwvergunning verleend&amp;lt;/Literal&amp;gt;&amp;lt;/PropertyIsEqualTo&amp;gt;&amp;lt;/Within&amp;gt;&amp;lt;/And&amp;gt;&amp;lt;/ogc:Filter&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;2:via use of the xml-filter expression &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;lt;ogc:Filter&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp; &amp;lt;ogc:And&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ogc:PropertyIsEqualTo&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ogc:PropertyName&amp;gt;status&amp;lt;/ogc:PropertyName&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ogc:Literal&amp;gt;Bouwvergunning verleend&amp;lt;/ogc:Literal&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ogc:PropertyIsEqualTo&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;gml:boundedBy&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;gml:Envelope srsDimension="2" srsName="urn:ogc:def:crs:EPSG::28992"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;gml:lowerCorner&amp;gt;107240 508576&amp;lt;/gml:lowerCorner&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;gml:upperCorner&amp;gt;109000 510167&amp;lt;/gml:upperCorner&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/gml:Envelope&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/gml:boundedBy&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ogc:And&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;&amp;lt;/ogc:Filter&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman', serif;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;source used: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gdsc.nlr.nl/gdsc/en/software/excat/manual/ogcfilter_examples" rel="nofollow" target="_blank"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;http://gdsc.nlr.nl/gdsc/en/software/excat/manual/ogcfilter_examples&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;Any advice is much appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #212121; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; font-size: 15px; background-color: white;"&gt;&lt;SPAN style="color: #44546a; font-size: 10pt; font-family: Arial, sans-serif;"&gt;Cheers! &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 22:00:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-construct-a-wfs-url-that-both-filters-on-an/m-p/328005#M30290</guid>
      <dc:creator>basboers1</dc:creator>
      <dc:date>2015-02-06T22:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to construct a WFS-URL that both filters on an attribute and uses a boudingbox filter</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-construct-a-wfs-url-that-both-filters-on-an/m-p/328006#M30291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Together with my colleague Gert-Jan van Weijden I found a solution for combining a spatial filter and an attribute filter in a WFS-request. As expected this only works when integrating both query-expressions within the filter-statement, as these criteria rule eachother out otherwise: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After extensive experimenting with formulating ogc-compliant requests, Gert-Jan pointed out the option of using a much more straightforward CQL-filter, which is an extension on Geoserver. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Using the cql-approach worked fine when combining a bounding box with an attribute filter for: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs" rel="nofollow" target="_blank"&gt;http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs&lt;/A&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The full successful request (which as intended renders only the municipality of Almere and not Breda, because only Almere lies within de defined bounding box):&lt;/P&gt;&lt;P&gt;&lt;A href="http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs?SERVICE=WFS&amp;amp;VERSION=2.0.0&amp;amp;REQUEST=GetFeature&amp;amp;TYPENAME=bestuurlijkegrenzen:gemeenten&amp;amp;SRSNAME=EPSG:28992&amp;amp;cql_filter=(bbox(geom,100000,450000,200000,500000,%27EPSG:28992%27)and((gemeentenaam=%27Almere%27)or(gemeentenaam=%27Breda%27)))" title="http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs?SERVICE=WFS&amp;amp;amp;VERSION=2.0.0&amp;amp;amp;REQUEST=GetFeature&amp;amp;amp;TYPENAME=bestuurlijkegrenzen:gemeenten&amp;amp;amp;SRSNAME=EPSG:28992&amp;amp;amp;cql_filter=(bbox(geom,100000,450000,200000,500000,%27EPSG:28992%27)an"&gt;&lt;SPAN lang="EN-GB" style="font-size: 10.0pt; font-family: Arial; background: white;"&gt;http://geodata.nationaalgeoregister.nl/bestuurlijkegrenzen/wfs?SERVICE=WFS&amp;amp;VERSION=2.0.0&amp;amp;REQUEST=GetFeature&amp;amp;TYPENAME=bestuurlijkegrenzen:gemeenten&amp;amp;SRSNAME=EPSG:28992&amp;amp;cql_filter=(bbox(geom,100000,450000,200000,500000,%27EPSG:28992%27)and((gemeentenaam=%27Almere%27)or(gemeentenaam=%27Breda%27)))&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However using the same formula for the &lt;A _jive_internal="true" href="https://community.esri.com/message/WFS http:/geodata.nationaalgeoregister.nl/bag/wfs"&gt;BAG&lt;/A&gt;-WFS, wasn’t directly successful. As it turned out “geom.”&amp;nbsp; - from the URL above - refers to the property name of the geometry-field (and should do so). Since the geometry-field of the BAG-WFS is “geometrie” , “geom” should be replaced here for “geometrie”. Having made this substitution renders the following successful request for the BAG-WFS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Arial; color: #003366; background: white;"&gt;&lt;A class="jive-link-external-small" href="http://geodata.nationaalgeoregister.nl/bag/wfs?REQUEST=GetFeature&amp;amp;SERVICE=WFS&amp;amp;VERSION=2.0.0&amp;amp;TYPENAME=bag:pand&amp;amp;SRSNAME=EPSG:28992&amp;amp;cql_filter=(bbox(geometrie" rel="nofollow" target="_blank"&gt;http://geodata.nationaalgeoregister.nl/bag/wfs?REQUEST=GetFeature&amp;amp;SERVICE=WFS&amp;amp;VERSION=2.0.0&amp;amp;TYPENAME=bag:pand&amp;amp;SRSNAME=EPSG:28992&amp;amp;cql_filter=(bbox(geometrie&lt;/A&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;107240,507000,109000,509000,%27EPSG:28992%27)and(status=%27Bouwvergunning verleend%27))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 21:36:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-construct-a-wfs-url-that-both-filters-on-an/m-p/328006#M30291</guid>
      <dc:creator>basboers1</dc:creator>
      <dc:date>2015-02-25T21:36:50Z</dc:date>
    </item>
  </channel>
</rss>

