Go to previous pageGo to next page

1.4.3. GetFeature

GetFeature Request

A GetFeature request is defined by several query elements. The main element is typeName (required attribute) which indicates the name of the feature. The names of the features (or layers) are found in the GetCapabilities result file (see content of the tag <Name> (child element of FeatureType) in the image "Result of the GetCapabilities request" above or in the GetCapabilities-XML file you saved on your computer).


You are now ready to create a GetFeature request on your own. Tip: Take the GetCapabilities request we already used and change the request type into GetFeature. Add the typeName attribute and choose one layer name you found in the GetCapabilities response document so that it looks like typeName=layername. Don't forget to set '&' between the different query parameters. Type this URL in the address bar of your browser and have a look at the resulting response.

Solution for GetFeature URL (Click here for more information)

You certainly noticed that downloading the GML file is quite time-consuming (besides for the layers park and fedlimit). This is because there are so many features within the layers. If you do not need all features, you can limit the number of features returned in the GML by using the MaxFeatures option:

The optional maxFeatures (e.g. &MAXFEATURES=100) attribute can be used to limit the number of explicitly requested features that a GetFeature request presents in the response document (OGC 2005).


Try it out by appending the MaxFeatures attribute at the end of your GetFeature URL. Type the new URL in the address bar of your browser and have a look at the resulting response. Compare it to the first result you got by the GetFeature request (especially size and download time).

Solution for GetFeature URL with maxFeature attribute (Click here for more information)


Play with the following application by clicking on the image. With a simple web interface and few buttons it is possible to manipulate the above mentioned parameters of the WFS. In contrary to a WMS (static image), the earthquake attributes are now accessible via mouseover. Web Feature       ServiceWeb Feature Service (Microimages Inc.)

Go to previous page
Go to next page