1

I have a WFS query filtering on a property and a spatial element. Exmaple:

<wfs:Query typeNames="bag:verblijfsobject" srsName="EPSG:28992">
    <fes:Filter>
        <fes:PropertyIsEqualTo matchCase="false">
            <fes:ValueReference>pandidentificatie</fes:ValueReference>
            <fes:Literal>0310100000665851</fes:Literal>
        </fes:PropertyIsEqualTo>
        <fes:And>
            <fes:Intersects>
                <fes:ValueReference>bag:geometrie</fes:ValueReference>
                <gml:Polygon gml:id="geo.1" srsName="EPSG:28992">
                    ...
                </gml:Polygon>
            </fes:Intersects>
        </fes:And>
    </fes:Filter>
</wfs:Query>

Basically this has the structure:

pandidentificatie=0310100000665851
and
bag:geometrie intersects with <gml>

How do I expand with multiple geometries so that I get the structure

pandidentificatie=0310100000665851
and  ( 
  bag:geometrie intersects with <gml1>
  or
  bag:geometrie intersects with <gml2>
  or
  bag:geometrie intersects with <gml3>
)
2

You can use the OR operator in exactly the same way as you use AND so your query could become:

<wfs:Query typeNames="bag:verblijfsobject" srsName="EPSG:28992">
    <fes:Filter>
      <fes:And>
        <fes:PropertyIsEqualTo matchCase="false">
            <fes:ValueReference>pandidentificatie</fes:ValueReference>
            <fes:Literal>0310100000665851</fes:Literal>
        </fes:PropertyIsEqualTo>
        <fes:Or>
            <fes:Intersects>
                <fes:ValueReference>bag:geometrie</fes:ValueReference>
                <gml:Polygon gml:id="geo.1" srsName="EPSG:28992">
                    ...
                </gml:Polygon>
            </fes:Intersects>
            <fes:Intersects>
                <fes:ValueReference>bag:geometrie</fes:ValueReference>
                <gml:Polygon gml:id="geo.122" srsName="EPSG:28992">
                    ...
                </gml:Polygon>
            </fes:Intersects>
            <fes:Intersects>
                <fes:ValueReference>bag:geometrie</fes:ValueReference>
                <gml:Polygon gml:id="geo.2" srsName="EPSG:28992">
                    ...
                </gml:Polygon>
            </fes:Intersects>
           </fes:Or>
        </fes:And>
    </fes:Filter>
</wfs:Query>

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.