Example usage
This sample conducts GetFeature operations for three times on data-world/wfs100, which can perform the GET request or execute the POST request for http://localhost:8090/iserver/services/data-world/wfs100.
Executes the Get request, gets features within 10 around point (0,0), and the request body is:
http://localhost:8090/iserver/services/data-world/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Capitals&PROPERTYNAME=(SMY,SMX,SMUSERID,SMLIBTILEID,SMID,SMGEOMETRYSIZE,COUNTRY,CAP_POP,CAPITAL,the_geom)&Filter= (<Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:DWithin xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyName>the_geom</ogc:PropertyName> <gml:Point> <gml:coordinates>0,0</gml:coordinates> </gml:Point> <ogc:Distance>10</ogc:Distance></ogc:DWithin></Filter>)
or executes the POST request, and the request body is:
<?xml version="1.0" ?>
<GetFeature version="1.1.0" service="WFS" handle="Query01"
xmlns="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml" xmlns:World="http://www.someserver.com/World"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd">
<Query typeName="World:Capitals">
<gml:PropertyName>SMY,SMX,SMUSERID,SMLIBTILEID,SMID,SMGEOMETRYSIZE,COUNTRY,CAP_POP,CAPITAL,the_geom</gml:PropertyName>
<ogc:Filter>
<ogc:DWITHIN>
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Point>
<gml:coordinates>0,0</gml:coordinates>
</gml:Point>
<ogc:Distance>10</ogc:Distance>
</ogc:DWITHIN>
</ogc:Filter>
</Query>
</GetFeature>
The response results as follows:
Executes the request, gets and specifies the feature gets away with the geometric object in the the World: Capitals.
http://localhost:8090/iserver/services/data-world/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Capitals&PROPERTYNAME=(SMY,SMX,SMUSERID,SMLIBTILEID,SMID,SMGEOMETRYSIZE,COUNTRY,CAP_POP,CAPITAL,the_geom)&Filter= (<Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:Disjoint xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyName>the_geom</ogc:PropertyName><gml:MultiPolygon> <gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-160,-80 -160,80 160,80 160,-80 -160,-80</gml:coordinates></gml:LinearRing>
</gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogc:Disjoint></Filter>)
or executes the POST request, and the request body is:
<?xml version="1.0" ?>
<GetFeature version="1.1.0" service="WFS" handle="Query01"
xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml" xmlns:World="http://www.someserver.com/World"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd">
<Query typeName="World:Capitals">
<wfs:PropertyName>SMY,SMX,SMUSERID,SMLIBTILEID,SMID,SMGEOMETRYSIZE,COUNTRY,CAP_POP,CAPITAL,the_geom</wfs:PropertyName>
<ogc:Filter>
<ogc:Disjoint xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:MultiPolygon>
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-160,-80 -160,80 160,80 160,-80 -160,-80</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ogc:Disjoint>
</ogc:Filter>
</Query>
</GetFeature>
The response results as follows:
Executes the request, gets the feature whose SMID is less than 10 in the World: Capitals, and the request body is:
http://localhost:8090/iserver/services/data-world/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Capitals&PROPERTYNAME=(SMY,SMX,SMUSERID,SMLIBTILEID,SMID,SMGEOMETRYSIZE,COUNTRY,CAP_POP,CAPITAL,the_geom)&Filter= (<Filter>
<ogc:PropertyIsLessThan xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal></ogc:PropertyIsLessThan></Filter>)
or executes the POST request, and the request body is:
<?xml version="1.0" ?>
<GetFeature version="1.1.0" service="WFS" handle="Query01"
xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml" xmlns:World="http://www.someserver.com/World"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.1.0/WFS.xsd">
<Query typeName="World:Capitals">
<wfs:PropertyName>SMY,SMX,SMUSERID,SMLIBTILEID,SMID,SMGEOMETRYSIZE,COUNTRY,CAP_POP,CAPITAL,the_geom</wfs:PropertyName>
<ogc:Filter>
<ogc:PropertyIsLessThan xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
</Query>
</GetFeature>
The response results as follows: