FILTER 示例 |
iServer 支持 <Add>、<And>、<Bbox>、<Beyond>、<Contains>、<Crosses>、<Disjoint>、<Distance>、<Div>、<Dwithin>、<Equals>、<Intersects>、<Literal>、<Mul>、<Not>、<Or>、<Overlaps>、<PropertyIsBetween>、<PropertyIsEqualTo>、<PropertyIsGreaterThan>、<PropertyIsGreaterThanOrEqualTo>、<PropertyIsLessThan>、<PropertyIsLessThanOrEqualTo>、<PropertyIsLike>、<PropertyIsNotEqualTo>、<PropertyIsNull>、<PropertyName>、<Sub>、<Touches>、<Within> 等 Filter 请求参数。
本示例中对 WFS 服务 data-world/wfs100进行 GetFeature 操作,可以执行 GET 请求,也可对 http://localhost:8090/iserver/services/data-world/wfs100 执行 POST 请求。
执行 GET 请求,在 World:Capitals 获取在(0,0)点周围10°范围内的 Feature,请求体为:
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>)
或执行 POST 请求,请求体为:
<?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>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取与指定几何对象相离的 Feature,请求体为:
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>)
或执行 POST 请求,请求体为:
<?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>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取 SMID 小于10的 Feature,请求体为:
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>)
或执行 POST 请求,请求体为:
<?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>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取 SMID 大于8小于10的 Feature,请求体为:
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:PropertyIsBetween xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMID</ogc:PropertyName><ogc:LowerBoundary><ogc:Literal>8</ogc:Literal></ogc:LowerBoundary><ogc:UpperBoundary><ogc:Literal>10</ogc:Literal></ogc:UpperBoundary></ogc:PropertyIsBetween></Filter>)
或执行 POST 请求,请求体为:
<?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:PropertyIsBetween xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:LowerBoundary>
<ogc:Literal>8</ogc:Literal>
</ogc:LowerBoundary>
<ogc:UpperBoundary>
<ogc:Literal>10</ogc:Literal>
</ogc:UpperBoundary>
</ogc:PropertyIsBetween>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取 SMID 等于10的 Feature,请求体为:
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:PropertyIsEqualTo xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal></ogc:PropertyIsEqualTo></Filter>)
或执行 POST 请求,请求体为:
<?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:PropertyIsEqualTo xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取 SMID 大于191的 Feature,请求体为:
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:PropertyIsGreaterThan xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>191</ogc:Literal></ogc:PropertyIsGreaterThan></Filter>)
或执行 POST 请求,请求体为:
<?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:PropertyIsGreaterThan xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>191</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取 SMID 大于或等于191的 Feature,请求体为:
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:PropertyIsGreaterThanOrEqualTo xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>191</ogc:Literal></ogc:PropertyIsGreaterThanOrEqualTo></Filter>)
或执行 POST 请求,请求体为:
<?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:PropertyIsGreaterThanOrEqualTo xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>191</ogc:Literal>
</ogc:PropertyIsGreaterThanOrEqualTo>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取 SMID 小于或等于1的 Feature,请求体为:
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:PropertyIsLessThanOrEqualTo xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal></ogc:PropertyIsLessThanOrEqualTo></Filter>)
或执行 POST 请求,请求体为:
<?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:PropertyIsLessThanOrEqualTo xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMID</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsLessThanOrEqualTo>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Continent_Label 获取 smuserid 不等于3的 Feature,请求体为:
http://localhost:8090/iserver/services/data-World/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Continent_Label&PROPERTYNAME=(SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID)&Filter= (<Filter>
<ogc:PropertyIsNotEqualTo xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMUSERID</ogc:PropertyName>
<ogc:Literal>3</ogc:Literal></ogc:PropertyIsNotEqualTo></Filter>)
或执行 POST 请求,请求体为:
<?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:Continent_Label">
<wfs:PropertyName>SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID</wfs:PropertyName>
<ogc:Filter>
<ogc:PropertyIsNotEqualTo xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMUSERID</ogc:PropertyName>
<ogc:Literal>3</ogc:Literal>
</ogc:PropertyIsNotEqualTo>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取 CAPITAL_EN 中包含 "gap" 字符的 Feature,请求体为:
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,CAPITAL_EN)&Filter= (<Filter>
<ogc:PropertyIsLike wildCard="*" singleChar="." escapeChar="!" xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>CAPITAL_EN</ogc:PropertyName>
<ogc:Literal>*gap*</ogc:Literal>
</ogc:PropertyIsLike>
</Filter>)
或执行 POST 请求,请求体为:
<?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">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="*" singleChar="." escapeChar="!" xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>Capitals:CAPITAL_EN</ogc:PropertyName>
<ogc:Literal>*gap*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Continent_Label 获取 CONTINENT 为空的 Feature,请求体为:
http://localhost:8090/iserver/services/data-World/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Continent_Label&PROPERTYNAME=(SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID)&Filter= (<Filter>
<ogc:PropertyIsNull xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>CONTINENT</ogc:PropertyName>
</ogc:PropertyIsNull></Filter>)
或执行 POST 请求,请求体为:
<?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:Continent_Label">
<wfs:PropertyName>SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID</wfs:PropertyName>
<ogc:Filter>
<ogc:PropertyIsNull xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>CONTINENT</ogc:PropertyName>
</ogc:PropertyIsNull>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取在指定面对象内部的 Feature,请求体为:
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:Within 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,-30 0,-30 0,-80 -160,-80</gml:coordinates></gml:LinearRing>
</gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogc:Within></Filter>)
或执行 POST 请求,请求体为:
<?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:Within 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,-30 0,-30 0,-80 -160,-80</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ogc:Within>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取与指定面对象只在边界处相交的 Feature,请求体为:
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:Touches 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>38.97,15 38.97,18 40,18 40,15 38.97,15</gml:coordinates></gml:LinearRing>
</gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogc:Touches></Filter>)
或执行 POST 请求,请求体为:
<?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:Touches 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>38.97,15 38.97,18 40,18 40,15 38.97,15</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ogc:Touches>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capital 获取与指定点对象叠加后交集有交集的 Feature,请求体为:
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:Overlaps xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyName>the_geom</ogc:PropertyName><gml:Point> <gml:coordinates>38.97,15</gml:coordinates> </gml:Point></ogc:Overlaps></Filter>)
或执行 POST 请求,请求体为:
<?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:Overlaps xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Point>
<gml:coordinates>38.97,15</gml:coordinates>
</gml:Point>
</ogc:Overlaps>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Continent_Label 获取与指定面对象相交的线 Feature,请求体为:
http://localhost:8090/iserver/services/data-World/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Continent_Label&PROPERTYNAME=(SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID)&Filter= (
<Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:Intersects xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMGEOMETRY</ogc:PropertyName><gml:MultiPolygon><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-51,30 -51,80 -21,80 -21,30 -51,30</gml:coordinates></gml:LinearRing>
</gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogc:Intersects></Filter>
)
或执行 POST 请求,请求体为:
<?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:Continent_Label">
<wfs:PropertyName>SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID</wfs:PropertyName>
<ogc:Filter>
<ogc:Intersects xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMGEOMETRY</ogc:PropertyName>
<gml:MultiPolygon>
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-51,30 -51,80 -21,80 -21,30 -51,30</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ogc:Intersects>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capital 获取与指定点对象重合的 Feature,请求体为:
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:Equals xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyName>the_geom</ogc:PropertyName><gml:Point> <gml:coordinates>45.34414232844949,2.0411730219592243</gml:coordinates> </gml:Point></ogc:Equals></Filter>)
或执行 POST 请求,请求体为:
<?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:Equals xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Point>
<gml:coordinates>45.34414232844949,2.0411730219592243</gml:coordinates>
</gml:Point>
</ogc:Equals>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Continent_Label 获取穿越指定面对象的线 Feature,请求体为:
http://localhost:8090/iserver/services/data-World/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Continent_Label&PROPERTYNAME=(SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID)&Filter= (
<Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:Crosses xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>SMGEOMETRY</ogc:PropertyName><gml:MultiPolygon><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-51,30 -51,80 -21,80 -21,30 -51,30</gml:coordinates></gml:LinearRing>
</gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogc:Crosses></Filter>
)
或执行 POST 请求,请求体为:
<?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:Continent_Label">
<wfs:PropertyName>SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID</wfs:PropertyName>
<ogc:Filter>
<ogc:Crosses xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>SMGEOMETRY</ogc:PropertyName>
<gml:MultiPolygon>
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-51,30 -51,80 -21,80 -21,30 -51,30</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ogc:Crosses>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Continent_Label 获取能够包含指定点对象的 Feature,请求体为:
http://localhost:8090/iserver/services/data-World/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Continent_Label&PROPERTYNAME=(SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID)&Filter= (<Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:Contains xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyName>the_geom</ogc:PropertyName><gml:Point> <gml:coordinates>-22.83090368222439,67.9857219158567</gml:coordinates> </gml:Point></ogc:Contains></Filter>)
或执行 POST 请求,请求体为:
<?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:Continent_Label">
<wfs:PropertyName>SMID,SMUSERID,SMLENGTH,SMTOPOERROR,SMGEOMETRY,CONTINENT,ID</wfs:PropertyName>
<ogc:Filter>
<ogc:Contains xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Point>
<gml:coordinates>-22.83090368222439,67.9857219158567</gml:coordinates>
</gml:Point>
</ogc:Contains>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取到指定点对象的距离必须大于或等于170°范围内的 Feature,请求体为:
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:Beyond 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>170</ogc:Distance></ogc:Beyond></Filter>)
或执行 POST 请求,请求体为:
<?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:Beyond>
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Point>
<gml:coordinates>0,0</gml:coordinates>
</gml:Point>
<ogc:Distance>170</ogc:Distance>
</ogc:Beyond>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取在指定边界框内部的 Feature,请求体为:
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:BBOX xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyName>the_geom</ogc:PropertyName><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"><gml:coordinates>-160,-80 -160,-30 0,-30 0,-80 -160,-80</gml:coordinates></gml:Box></ogc:BBOX></Filter>)
或执行 POST 请求,请求体为:
<?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:BBOX xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates>-160,-80 -160,-30 0,-30 0,-80 -160,-80</gml:coordinates>
</gml:Box>
</ogc:BBOX>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取人口数(CAP_POP)加100仍小于1000的 Feature,请求体为:
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:PropertyIsLessThan xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Add> <ogc:PropertyName>CAP_POP</ogc:PropertyName><ogc:Literal>100</ogc:Literal></ogc:Add><ogc:Literal>1000</ogc:Literal></ogc:PropertyIsLessThan></Filter>)
或执行 POST 请求,请求体为:
<?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:Add>
<ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>100</ogc:Literal>
</ogc:Add>
<ogc:Literal>1000</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取人口数(CAP_POP)除以10为750的 Feature,请求体为:
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:PropertyIsEqualTo xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Div> <ogc:PropertyName>CAP_POP</ogc:PropertyName><ogc:Literal>10</ogc:Literal></ogc:Div><ogc:Literal>750</ogc:Literal></ogc:PropertyIsEqualTo></Filter>)
或执行 POST 请求,请求体为:
<?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:PropertyIsEqualTo xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Div>
<ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:Div>
<ogc:Literal>750</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取人口数(CAP_POP)乘以10大于130,762,000的 Feature,请求体为:
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:PropertyIsGreaterThan xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Mul> <ogc:PropertyName>CAP_POP</ogc:PropertyName><ogc:Literal>10</ogc:Literal></ogc:Mul><ogc:Literal>130762000</ogc:Literal></ogc:PropertyIsGreaterThan></Filter>)
或执行 POST 请求,请求体为:
<?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:PropertyIsGreaterThan xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Mul>
<ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>10</ogc:Literal>
</ogc:Mul>
<ogc:Literal>130762000</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取人口数(CAP_POP)减3000后小于1000的 Feature,请求体为:
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:PropertyIsLessThan xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Sub> <ogc:PropertyName>CAP_POP</ogc:PropertyName><ogc:Literal>3000</ogc:Literal></ogc:Sub><ogc:Literal>1000</ogc:Literal></ogc:PropertyIsLessThan></Filter>)
或执行 POST 请求,请求体为:
<?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:Sub>
<ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>3000</ogc:Literal>
</ogc:Sub>
<ogc:Literal>1000</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取到指定点对象的距离必须大于或等于170°范围内且人口数(CAP_POP)大于300,000的 Feature,请求体为:
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:Filter><ogc:And><ogc:Beyond 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>170</ogc:Distance></ogc:Beyond><ogc:PropertyIsGreaterThan><ogc:PropertyName>CAP_POP</ogc:PropertyName><ogc:Literal>300000</ogc:Literal></ogc:PropertyIsGreaterThan></ogc:And></Filter>)
或执行 POST 请求,请求体为:
<?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:And>
<ogc:Beyond>
<ogc:PropertyName>the_geom</ogc:PropertyName>
<gml:Point>
<gml:coordinates>0,0</gml:coordinates>
</gml:Point>
<ogc:Distance>170</ogc:Distance>
</ogc:Beyond>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>300000</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:And>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取人口数(CAP_POP)不大于1000的 Feature,请求体为:
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:Not>
<ogc:PropertyIsGreaterThan xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>1000</ogc:Literal></ogc:PropertyIsGreaterThan></ogc:Not></Filter>)
或执行 POST 请求,请求体为:
<?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:Not>
<ogc:PropertyIsGreaterThan xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>1000</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Not>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下:
执行 GET 请求,在 World:Capitals 获取人口数(CAP_POP)小于1000或大于13,000,000的 Feature,请求体为:
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:Filter><ogc:Or><ogc:PropertyIsLessThan><ogc:PropertyName>CAP_POP</ogc:PropertyName><ogc:Literal>1000</ogc:Literal></ogc:PropertyIsLessThan><ogc:PropertyIsGreaterThan><ogc:PropertyName>CAP_POP</ogc:PropertyName><ogc:Literal>13000000</ogc:Literal></ogc:PropertyIsGreaterThan></ogc:Or></Filter>)
或执行 POST 请求,请求体为:
<?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:Or>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>1000</ogc:Literal>
</ogc:PropertyIsLessThan>
<ogc:PropertyIsGreaterThan>
<ogc:PropertyName>CAP_POP</ogc:PropertyName>
<ogc:Literal>13000000</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:Or>
</ogc:Filter>
</Query>
</GetFeature>
响应结果如下: