Skip To Content

WFS To Feature Class


Imports a feature type from a web feature service (WFS) to a feature class in a geodatabase.


  • After setting the URL for the WFS server, all feature types published from the server are listed. Examples can include WFS feature types for schools, roads and parcels. One of these is then selected and an output location and feature class name are specified. The output location can be the root level of a geodatabase or a feature dataset within a geodatabase.

  • By default all features from the WFS source are added to the feature class. The extent environment setting can be used to limit the features to just those that intersect a user-defined extent. You can also specify an output config keyword using the geodatabase settings section of the environment settings.


WFSToFeatureClass_conversion (input_WFS_server, WFS_feature_type, out_path, {out_name})
ParameterExplanationData Type

The URL of the source WFS service.


The name of the feature type to extract from the input WFS service.


The output location can be the root level of a geodatabase or a feature dataset within a geodatabase. If the output location is a feature dataset, the coordinates are converted from the source coordinate system to the coordinate system of the feature dataset.

Workspace; Feature Dataset

The name of the feature class to create within the output location. If the feature class name already exists in the geodatabase, the name will be auto-incremented. By default, the feature type name is used.


Derived Output

NameExplanationData Type

The output feature class.

Feature Class

Code sample

WFSToFeatureClass example 1 (stand-alone script)

The following script demonstrates how to execute the WFSToFeatureClass tool in a stand-alone script.

# Name:
# Description: Create a feature class from a WFS service

# Import arcpy module
import arcpy

# Set local variables
WFS_Service = ""
WFS_FeatureType = "cities"
Out_Location = "C:/Data/Default.gdb"
Out_Name = "SampleWorldCities"

# Execute the WFSToFeatureClass tool
arcpy.WFSToFeatureClass_conversion(WFS_Service, WFS_FeatureType, Out_Location, Out_Name)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics