Add WFS services

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

  1. On the Insert tab, in the Project group, click the Connections drop-down list and click New WFS Server.

    The Add WFS Server Connection dialog box appears.

  2. 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.

    For example, http://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WFSServer

  3. Select the WFS version you want to connect to. The default version connects to the highest number version supported on the server.
  4. If the WFS service you are connecting to has additional capabilities or you want to set a property for the WFS server connection, you can add custom request parameter names and values to the Custom request parameters section. Be aware that ArcGIS Pro cannot validate these additional parameters.

    To add custom parameters, do the following:

    1. Click in the first cell.
    2. Specify the parameter name in the cell under the Parameter column.
    3. Specify the parameter value in the cell under the Value column.
    4. To add additional parameters, click the Add Row button and repeat steps a through c.

    To delete custom parameters, do the following:

    1. Select the row that contains the parameter to be deleted.
    2. Click Remove Row to delete the row.
    3. Repeat steps a and b for every parameter to be deleted.
  5. Type your user name and password if appropriate.

    If you want to save your user name and password information to avoid entering it each time you connect, check the Save Username/Password check box.

  6. 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.

  7. Expand the WFS connection to view the layers present in the WFS service. Right-click a layer and click either Add to new map or 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 WFS item is added to the map. You can optionally cancel adding the layer to the map by clicking Cancel on the progress dialog box. If your 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. You can select a group of layers by pressing Shift and clicking the first and last sublayer in the group you want to add. You can also select nonsequential layers by pressing Ctrl and clicking each individual layer. After selecting the layers, right-click the selected layers and choose to add them to either your 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:

  1. In the Catalog pane, click the Portal tab.
  2. Browse to or search for the WFS items you want to use in the My Content, Groups, or All Portal collections.

    Hover over a portal item to see the item type.

  3. Right-click the item and click either Add to new map or 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 WFS item is added to the map. You can optionally cancel adding the layer to the map by clicking Cancel on the progress dialog box. If your 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. You can select a group of layers by pressing Shift and clicking the first and last sublayer in the group you want to add. You can also select nonsequential layers by pressing Ctrl and clicking each individual layer. After selecting the layers, right-click the selected layers and choose to add them to either your current map or a new map. Adding multiple layers at once takes longer than adding one layer.

Use a custom request parameter

The custom request parameters form can be used to input additional capabilities that are supported by your WFS service. The input key value pair can be a custom parameter that is specific to your 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 execute a custom query on the service. The key-value pair will be appended to the WFS URL after the question mark (?) character. For example, your WFS URL is http://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 your WFS service, it will append the key-value pair to the WFS URL, for example, http://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 need to 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:

KeywordDescription

BBOX

Provide a BBOX 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 your 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.

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 your service supports the output format specified. You can check which output formats your service supports in the GetCapabilities response.

  • GEOJSON—Request the features in a GeoJSON format.
  • GEOJSON + GZIP—Request the features in a GeoJSON GZip format, for example, GEOJSON%2BGZIP.
  • ESRIGEOJSON—Request the features in an Esri GeoJSON format.
  • ESRIGEOJSON + GZIP—Request the features in an Esri GeoJSON GZip format, for example, ESRIGEOJSON%2BGZIP

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, no page size is used. This can cause slow performance from a service when requesting a large number of features in one request. Use this keyword to request a smaller number of features in multiple pages. For example, PAGESIZE equals 1000.

This keyword is only applicable for WFS 2.0 services that support startIndex and count parameters.

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 your layer.

  • TRUE—Swap the order of X,Y.
  • FALSE—Do not swap the order of X,Y. This is the default.

SWAPXYFILTER

Swap the x,y coordinates for spatial filter requests sent to the server.

  • TRUE—Swap the order of X,Y for filter requests.
  • FALSE—Do not swap the order of X,Y for filter requests. This is the default.
Note:

With the exception of the BBOX, STRINGLENGTH, OUTPUTFORMAT, and PAGESIZE keywords, all of these 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.

Related topics