GetFeatureInfo Request

Feedback


Request parameters

The GetFeatureInfo operation supposes that after users get a map picture by the GetMap operation, they click on a point in this picture to query object information of the specified location in this picture. However, since the WMS protocol has no status, the WMS server does not know information of the map picture "clicked" when the client implementing GetFeatureInfo. Therefore, parameters in the GetFeatureInfo operation should contain almost all request parameters of the GetMap operation (except VERSION and REQUEST) so as to be consistent with maps got by the GetMap operation.

The parameters of a GetFeatureInfo request are listed in Table 1 below.

Table 1 The Parameters of a GetFeatureInfo Request

Request parameters O/M /Optional Description
VERSION=version

R

Request version.

REQUEST=GetFeatureInfo

R

Request name.

Ruquests the GetFeatureInfo operation, and the request name should be set as "GetFeatureInfo".

LAYERS=layer_list

R

As GetMap.

BBOX=minx,miny,maxx,maxy

R

As GetMap.

WIDTH=output_width

R

As GetMap.

HEIGHT=output_height

R

As GetMap.

QUERY_LAYERS=layer_list

R

Comma-separated list of one or more layers to be queried.

INFO_FORMAT=output_format

O

Return format of feature information (MIME type).

Must be application/vnd.ogc.wms_xml.

FEATURE_COUNT=number

O

Number of features about which to return information (default=1).

The required X and Y parameters indicate a point of interest on the map. X and Y identify a single point within the borders of the WIDTH and HEIGHT parameters of the embedded GetMap request. The origin is set to (0,0) centered in the pixel at the upper left corner; X increases to the right and Y increases downward. If query results are smaller than the value of user-specified number, doubles the search radius and continues to search; if the number of query results satisfies the feature number that users require to return, returns the results, or continues to increase the radius. When the search radius reaches 8 times of the initial search radius, ends the query and returns the query results, then goes into the query of next layer.

The query order of layers is consistent with the order in the list of layers to be queried.

X=pixel_column

R

X coordinate in pixels of feature (measured from upper left corner=0)

Y=pixel_row

R

Y coordinate in pixels of feature (measured from upper left corner=0)

EXCEPTIONS=exception_format

O

The format in which exceptions are to be reported by the WMS (default=application/vnd.ogc.se_xml).

Vendor-specific parameters

O

Optional experimental parameters.

SuperMap has not realized this functionality at present.

 

Note: The case of parameters is not mandatory, and request parameters can be arranged in an arbitrary order.

Request example

Request methods of the GetFeatureInfo operation are as follows:

<ServiceRoot>?VERSION=version&REQUEST=GetFeatureInfo&SRS=&layers=&STYLES=&BBOX=&WIDTH=&HEIGHT=&QUERY_LAYERS=&X=&Y=

ServiceRoot is the service URI root directory. Please see Setting the Service URI.

For example, after the local SuperMap iServer 6R WMS 1.1.1 service is started successfully, the URI of accessing the GetFeatureInfo operation is:http://localhost:8090/iserver/services/map-world/wms111/WorldMap_Day?VERSION=1.1.1&REQUEST=GetFeatureInfo&SRS=EPSG:4326&layers=0.8,0.11&STYLES=&BBOX=-180.0,-90.0,180.0,90.0&WIDTH=800&HEIGHT=400&QUERY_LAYERS=0.11&X=650&Y=150.