ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

WFS To Feature Class

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

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

Usage

  • 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 and output spatial grids using the geodatabase settings section of the environment settings.

Syntax

arcpy.conversion.WFSToFeatureClass(input_WFS_server, WFS_feature_type, out_path, {out_name})
ParameterExplanationData Type
input_WFS_server

The URL of the source WFS service.

String
WFS_feature_type

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

String
out_path

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
out_name
(Optional)

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.

String

Derived Output

NameExplanationData Type
out_feature_class

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: WFSToFeatureClass_example1.py
# Description: Create a feature class from a WFS service

# Import arcpy module
import arcpy

# Set local variables
WFS_Service = "http://sampleserver6.arcgisonline.com/arcgis/services/SampleWorldCities/MapServer/WFSServer?request=GetCapabilities&service=WFS"
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)

Environments

  • Extent
  • Output CONFIG Keyword
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3

Licensing information

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

Related topics

  • An overview of the From WFS toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal