A Web Feature Service (WFS) is an open specification for serving geographic features over the web. Unlike a Web Map Service (WMS), a WFS service returns actual features with geometry and attributes. You can connect to an Open Geospatial Consortium (OGC) WFS service in ArcGIS Pro by creating a WFS service connection or adding a WFS item from your active portal.
Add a WFS server connection
To add a WFS server connection, complete the following steps:
- On the Insert tab, in the Project group, click the Connections button, click Server, and click New WFS Server
.
The Add WFS Server Connection dialog box appears.
- Type the URL of the WFS server site you want to connect to in the Server URL text box.
The URL varies depending on the site configuration.
An example URL is: https://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WFSServer
- From the Version drop-down menu, select the WFS version you want to connect to.
The default version connects to the highest number version supported on the server.
- If the WFS service you are connecting to has additional capabilities or you want to set an ArcGIS Pro client-specific property for the WFS server connection, add custom request parameter names and values to the Custom request parameters section.
Some examples of ArcGIS Pro client-specific reserved keywords that are commonly used are PAGESIZE to enable client-side paging, BBOX to limit features to a specific geographic area, MAXFEATURES to set the limit for number of features displayed in the map (by default a limit of 3000 is used), and SWAPXY to swap the axis order of the layer. These keywords are applied to all layers listed in the WFS server connection. To modify the properties for individual layers, you can view or modify them on the WFS tab of the layer properties. Be aware that ArcGIS Pro cannot validate server-specific additional parameters.
To add custom parameters, do the following:
- Click in the first cell.
- Specify the parameter name in the cell under the Parameter column.
- Specify the parameter value in the cell under the Value column.
- To add more parameters, click the Add Row button and repeat steps a through c.
To delete custom parameters, do the following:
- Select the row that contains the parameter to be deleted.
- Click Remove Row to delete the row.
- Repeat steps a and b for every parameter to be deleted.
- If applicable, authenticate the service by doing one of the following:
- If the service is secured using basic authentication, in the Authentication drop-down menu, click Server Authentication, and type the username and password. To save the user name and password to Windows Credential Manager or in the connection file, check the options under the Save Login heading.
- If the service is secured using OAuth 2.0 based authentication, in the Authentication drop-down menu, click the appropriate connection from the drop-down list. See Connect to authentication providers from ArcGIS Pro to learn how to add a connection to authentication providers if one is not available. If necessary, click Sign In to authenticate the connection with the provider.
- Click OK.
A WFS connection file (.wfs) is created and saved in the project's home folder. An item referencing this connection file is added to the project, and the connection appears in the Servers folder on the Project tab of the Catalog pane.
- Expand the WFS connection to view the layers in the WFS service, right-click a layer and click an option in the Add To New drop-down menu, or click Add To Current Map
to add the WFS layer to the map.
You can also add the service to the map by dragging it onto the map or into the Contents pane.
The Add WFS Layer dialog box appears with layer options, and the WFS layer is added to the map. You can cancel adding the layer to the map by clicking Cancel on the progress dialog box. If the data does not display as expected when added to the map, you can modify the WFS layer properties.
WFS services allow you to add one or more layers. To select a group of layers, press Shift and click the first and last sublayer in the group you want to add. You can also select nonsequential layers by pressing Ctrl while clicking each individual layer. After selecting the layers, right-click the selected layers and choose to add them to either the current map or a new map. Adding multiple layers at once takes longer than adding one layer.
Add a WFS service from your active portal connection
WFS services can also be added to your portal. There are three sources for WFS items in your portal as follows:
- WFS services that are published to ArcGIS Server sites you have federated with your portal are added automatically as items in your portal.
- Third-party WFS services that are added as an item in your portal.
- Hosted WFS services, which are created by publishing a WFS service from a hosted feature layer.
Each of these types of WFS portal items can be added to the map using the following steps:
- In the Catalog pane, click the Portal tab.
- Browse to or search for the WFS items you want to use from the My Content, My Groups, or ArcGIS Online collections.
Hover over a portal item to see the item type.
- Right-click the item and click an option in the Add To New drop-down menu, or click Add To Current Map
to add the WFS layer to the map.
You can also add the service to the map by dragging it onto the map or into the Contents pane. If the service contains multiple layers, you are prompted to choose the layer to add to the map.
The Add WFS Layer dialog box appears with layer options, and the WFS layer is added to the map. You can cancel adding the layer to the map by clicking Cancel on the progress dialog box. If the data does not display as expected when added to the map, you can modify the WFS layer properties.
WFS services allow you to add one or more layers. To select a group of layers, press Shift and click the first and last sublayer in the group you want to add. You can also select nonsequential layers by pressing Ctrl while clicking each individual layer. After selecting the layers, right-click the selected layers and choose to add them to either the current map or a new map. Adding multiple layers at once takes longer than adding one layer.
Use the Add WFS Layer(s) dialog box
The Add WFS Layer(s) dialog box allows you to set some of the optional layer properties that are available for WFS layers. This includes setting the maximum feature count and a page size, as well as limiting features to an area of interest by providing an extent. You can also modify these properties on the WFS layer properties dialog box.

- Set the maximum features returned—Set the total number of features to be added to the map. Adding a very large dataset to the map can cause performance issues and slowness. This option allows you to limit the number of features that are added to the map. If used with the Use Spatial Extent parameter, this will limit the number of features within the extent provided.
- Set page size—For WFS 2.0 services that support paging, you can set the number of features to be returned per load request from the server. For a WFS GetFeature request, this sets the count parameter value that is used in conjunction with the startIndex parameter for paging requests. ArcGIS Pro will try to determine the best page size to use based on your service settings, however, the optimal value may be dependent on the performance of the server to return features before hitting a timeout (approximately 15 seconds). For example, servers that can return 25,000 features before timeout would see a much faster map loading time if the page size is set to 25000. This decreases the total requests sent to the server from the client. However, some less performing servers may only be able to return for example, 200 features before timeout. In this case, a low value for page size will be needed to avoid loading errors due to timeout and you will see an increase in requests sent to the server to load data.
- Use Spatial Extent—Choose to limit features by providing an area of interest (spatial extent).
- Checked—Limit the features added to the map by providing an extent. The WFS service must support the BBOX parameter to use this functionality. Provide the extent to use in the Selected extent parameter.
- Unchecked—Do not spatially limit the features added to the map. This is the default.
- Selected extent—Set a custom extent to use to limit the data added to the map. You may enter the coordinates manually or borrow extent values from the current visible extent, the extent of data in all layers, the extent of a specific layer.
The properties on the Add WFS Layer dialog box are also available to view or modify on the WFS tab of the Layer Properties dialog box.
The ArcGIS data model allows only one geometry type per table. If a mixed geometry WFS layer is added to the map, the geometry type of the layer is determined by querying the first feature in the WFS service. For example, if the first row in the data is a polygon, the WFS layer will be added to the map as a polygon layer.
Use a custom request parameter
The custom request parameters form can be used to input additional capabilities that are supported by the WFS service. The input key value pair can be a custom parameter that is specific to the WFS server implementation, or you can use one of the reserved keywords implemented by the ArcGIS Pro client.
Use a key value pair
Some WFS services may have specific key-value pairs that are used to run a custom query on the service. The key-value pair will be appended to the WFS URL after the question mark character. For example, the WFS URL is https://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WFSServer?. If you have a custom parameter named myCustomKey, you can enter the myCustomKey value into the Parameter cell and enter the value in the Value cell. When ArcGIS Pro makes a request to connect to the WFS service, it will append the key value pair to the WFS URL, for example, https://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WFSServer?request=GetCapabilities&service=WFS&myCustomKey=myValue.
Use a reserved keyword
The ArcGIS Pro WFS client has reserved keywords that can be used to specify a connection property for the WFS server connection. The value you set for these parameters will apply to all layers in the WFS service. If you want to apply a reserved keyword to individual layers in the WFS service instead of per service connection, you must create multiple connections with the different parameter values or update the WFS layer properties in the map. The following table lists the custom parameter names and values you can use to set the properties of the WFS server connection file:
Keyword | Description |
---|---|
BBOX | Provide a bounding box extent to limit the extent of the features returned, for example, -122.5,37.7,-122.3,37.8. This parameter is useful when you want to limit the number of features returned in all of the WFS layers to a specific geographic area. This is only applicable for snapshot mode. |
MAXFEATURES | Set the maximum number of features returned for layers in a WFS server connection. Setting this value can avoid performance problems if the service has a large number of features. The default value is 3000. If your data is large, you can set this to a large number to see more features. If your service supports paging, you can adjust the PAGESIZE parameter to more efficiently load your data. |
MODE | Specify which connection mode to use for your layer. By default, the connection mode is snapshot.
|
OUTPUTFORMAT | Specify the format in which to request the features. WFS services can support multiple output format types, but by default, the format is GML. Only use this option if the service supports the output format specified. You can check which output formats the service supports in the GetCapabilities response.
The SWAPXY and SWAPXYFILTER properties are not applicable when the output format is GeoJSON. |
PAGESIZE | Specify the page size to use when a GetFeature request is made to load data into the map. By default, if the service supports paging, a page size value of 200 is used. Use this keyword to modify the number of features to be returned per request (using the WFS count= parameter). The optimal value to use for page size is dependent on the performance of the server. Ideally, this value will be set to the maximum number of features that the service can return in one GetFeature request without the server timing out (approximately 15 seconds). For servers that have a fast response time, a page size of 10,000 to 50,000 may work best. For servers that have a slow response time or a limit on the number of features returned per response, a smaller page size of 100 may avoid a timeout error. A service that does not support paging and has a large number of features, layers may have slow performance loading in the map since all features will be returned in one request. This keyword is only applicable for WFS 2.0 services that support startIndex and count parameters. The keyword is not applicable when using the on demand connection mode. |
STRINGLENGTH | Specify the length for text fields in the WFS layer. When a layer is opened in the map, the length of all text fields is truncated to 255 characters by default. |
SWAPXY | Swap the x,y coordinates for the display of the layer.
|
SWAPXYFILTER | Swap the x,y coordinates for spatial filter requests sent to the server.
|
HTTPMETHOD | Specify the HTTP method to use when sending requests to the server in on demand mode. By default, ArcGIS Pro sends POST requests to the server in on demand mode. This allows for more advanced filters to be sent to the server. However, some implementations of WFS do not support POST requests. In this case, you can set the HTTPMETHOD to GET and access basic functionality of the WFS layer in on demand mode.
|
Note:
With the exception of the BBOX, STRINGLENGTH, OUTPUTFORMAT, and HTTPMETHOD keywords, all of the keywords have a corresponding setting for the layer in the WFS layer properties. You can access the WFS layer properties by right-clicking the layer in the Contents pane and choosing Properties.
In addition to the keywords listed that can be used to specify WFS server connection properties, there are other reserved keywords that cannot be used since they have special meaning for WFS services or ArcGIS. These keywords include NAMESPACE, TYPENAME, VERSION, SERVICE, CRSNAME, REQUEST, USER, URL, PASSWORD, MODE, ANONYMOUS, HTTPTIMEOUT, CAPABILITIES_PARAMETERS, and CONNECTIONPATH.
Use the WFS To Feature Class tool
You can use the WFS to Feature Class geoprocessing tool to download data from a WFS service into a geodatabase. The tool allows you to script downloading WFS data and supports complex WFS services.
To use the tool to download data from a complex WFS service, use the following steps:
- Open the WFS to Feature Class geoprocessing tool.
You can open the tool by navigating to it in the Geoprocessing pane in the Conversion toolbox under the From WFS toolset, or you can use the search bar to search for the tool by name.
The WFS to Feature Class tool dialog box appears.
- If your WFS service is a complex service, check the Complex WFS service check box.
- Paste or type in the URL of your WFS service in the WFS Server parameter and click outside of the parameter text box.
http://gisserver.example.com/geoserver/ows?
This populates the Select Feature Type to Extract parameter drop-down menu with a list of available layers to download.
- Select a layer from the drop-down menu.
- Provide a location for the download using the Output Location parameter.
If Complex WFS service is checked, the output will be a file geodatabase so the location must be a folder.
If Complex WFS service is unchecked, the output will be a feature class so the location must be a geodatabase or a feature dataset in a geodatabase.
- Provide a name for the output feature class or geodatabase in the Name parameter.
- Optionally, choose to enter a value for the Max Features parameter to limit the number of features returned.
- Optionally, if Complex WFS service is checked, expose the service metadata by checking the Expose Metadata parameter, which will create and populate metadata tables in the output geodatabase.
- Optionally, to limit the features to an area of interest, provide an extent value for the Processing Extent parameter on the Environments tab (or set the arcpy.env.extent environment if using Python) when running the tool.
To automate this process in a Python script, you can find code samples in the tool documentation.