GetPropertyValue
The GetPropertyValue operation (WFS 2.0.0 and 2.0.2 only) returns a particular property value of a set of features, rather than a complete feature collection. The set of queried features is specified with a query expression, similar to the GetFeature operation. One major difference is that GetPropertyValue only supports a single query expression. Instead of a list of properties, a value expression string is used to identify the property to be returned in the operation result.
GET Request
The GET request contains:
Input | Required | Description |
---|---|---|
SERVICE=WFS |
Yes | Fixed to WFS. |
VERSION |
Yes | The supported version of the Web Feature Service standard (for this operation, either 2.0.0 or 2.0.2). |
REQUEST=GetPropertyValue |
Yes | Set to GetPropertyValue. |
TYPENAMES |
Yes | A comma-separated list of feature types. |
VALUEREFERENCE |
Yes | A value expression string used to identify the property to be returned in the operation result. |
COUNT |
No | The maximum number of features to return. |
For example, for v2.0.2:
http://server:port/rest/Spatial/WFS?SERVICE=WFS&VERSION=2.0.2&REQUEST=GetPropertyValue&TYPENAMES=miwfs:World&VALUEREFERENCE=Country&COUNT=10
POST Request
For example, for v2.0.2:
<wfs:GetPropertyValue xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:miwfs="http://www.mapinfo.com/wfs"
service="WFS"
version="2.0.2"
count="10"
valueReference="Country">
<wfs:Query srsName="http://www.opengis.net/def/crs/epsg/0/4326" typeNames="miwfs:World"/>
</wfs:GetPropertyValue>
Note: The v2.0.0 request uses the URN format for the
srsName
instead of the URL format used in the above example for 2.0.2.
The URN format can still be used for 2.0.2 but it is deprecated.Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<wfs:ValueCollection xmlns:wfs="http://www.opengis.net/wfs/2.0">
<wfs:member>Aruba</wfs:member>
<wfs:member>Antigua and Barbuda</wfs:member>
<wfs:member>United Arab Emirates</wfs:member>
<wfs:member>Afghanistan</wfs:member>
<wfs:member>Algeria</wfs:member>
<wfs:member>Azerbaijan</wfs:member>
<wfs:member>Albania</wfs:member>
<wfs:member>Armenia</wfs:member>
<wfs:member>Andorra</wfs:member>
<wfs:member>Angola</wfs:member>
</wfs:ValueCollection>