GetFeature Request

Feedback


Request parameters

Parameters for the GetFeature operation are listed in the following table.

Table 1 Parameters for GetFeature& GetFeatureWithLock operations

Request parameters Required/Optional Description

VERSION=version

Mandatory

Request version numbers.

The default value is 1.0.0.

SERVICE=WFS

Mandatory

Service type.

The default value is WFS.

REQUEST=GetFeature|GetFeatureWithLock

Mandatory

Request names.

Name of the operation, shall be "GetFeature" or "GetFeatureWithLock".

GetFeatureWithLock is similar with GetFeature. The selected feature will be locked if use GetFeatureWithLock, for example when changing the feature.

PROPERTYNAME=property_list

Optional

Properties list.

A list of properties may be specified for each feature type that is being queried.

For rules of request parameters, please refer to Request parameter rules. A "*" character can be used to indicate that all properties should be retrieved. There is a 1:1 mapping between each element in a FEATUREID or TYPENAME list and the PROPERTYNAME list. The default value represents that all the features can be obtained.

When WFS service perform the reference that did not choose all the features, WFS will extend the properties list to contain all the necessary properties names. So a WFS client may obtains more properties values than request.

The absence of a value also indicates that all properties will be returned.

FEATUREVERSION=ALL|N

Optional

Feature version.

If version is supported, a value of 'All' indicates to fetch all versions of a feature. An integer value fetches the Nth version of a feature. No value indicates that the latest version of the feature should be fetched.

The version number is from 1 and 1 is the oldest version. If the version value larger than the specified maximum number, it will return the latest version. Inquiring the default operations returns the latest version.

Ignores this parameter if don't support the subversion system and returns the only version.

Currently, SuperMap iServer doesn't support this parameter.

MAXFEATURES=N

Optional

The maximum of features.

A positive integer indicates the maximum number of features that the WFS should return in response to a query. If no value is specified, then the default value is 2000. This default value can be set in WFS interface. Please refer to WFS_Service Interface.

TYPENAME=type_list

Mandatory

A list of feature types upon which to apply the operation.

For rules of request parameters, please refer to Request parameter rules.

Optional if FEATUREID is specified.

FEATUREID=feature_id

Optional

Feature identifier.

Obtains the feature enumeration list through the feature identifier.

Mutually exclusive with FILTER and BBOX.

FILTER=filter

Optional

Filter.

Filter parameters are used to set the query restrictions. The query spatially and non-spatially both can be set.

The format of the filter is defined in the Filter Encoding Specification.

If the FILTER parameter is used, one filter must be specified for each feature type listed in the TYPENAME parameter. Individual filters encoded in the FILTER parameter are enclosed in parentheses "(" and ")".

Prerequisite: TYPENAME.

Mutually exclusive with FILTER and BBOX.

Now, it supports DWithin, Beyond, Contains, Crosses, Disjoint, Intersects and Distance, etc. Please refer to FilterType. It does not support FeatureId, Function and Geometry.

Please refer to FILTER Example.

BBOX=minx,miny,maxx,maxy

Optional

BoundingBox.

In lieu of a FEATUREID or FILTER, a client may specify a bounding box.

Prerequisite: TYPENAME.

Mutually exclusive with FILTER and FEATUREID.

Please refer to Bounding box.

OUTPUTFORMAT=outputformat

Optional

The result output format.

The default value is "GML2".

Other output formats are possible as well as long as their MIME type is advertised in the capabilities document.

Currently, WFS services published by SuperMap iServer support GML2 format only.

Request example

The method of GetFeature operation request is in the following way:

<ServiceRoot>?SERVICE=WFS&VERSION=version&REQUEST=GetFeature&TYPENAME=type_list

ServiceRoot is the URI root directory of service and refer to the URI setting of service

An example of GetFeature operation is as follows: http://localhost:8090/iserver/services/data-world/wfs100?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=World:Capitals&MAXFEATURES=5. Since MAXFEATURES=5, only the first 5 features of World:Capitals will be returned.

Please refer to Response example to see the result.