ArcGIS Desktop

  • 文档
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

Help

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

Geodatabase To Shape

  • 摘要
  • 用法
  • 语法
  • 代码示例
  • 环境
  • 许可信息

摘要

Exports one or more feature classes in a geodatabase to shapefiles.

This tool has three modes of converting feature classes to shapefiles: defense, generic, and MGCP. Each mode controls how the output shapefiles are named. The defense and MGCP export modes follow Esri Defense Mapping data model requirements. Generic mode uses the same logic as Feature Class To Feature Class.

用法

  • Conversion Method specifies the export mode.

  • Coded domain values are exported as part of the shapefile to maintain data integrity. You can choose to export them as raw values, string descriptions, or both.

语法

GeodatabaseToShape_defense (in_features, output_folder, coded_value_domain_export_mode, conversion_method, create_empties)
参数说明数据类型
in_features
[in_features,...]

The features used to create the shapefiles.

Feature Layer
output_folder

The folder that will contain the output shapefiles.

Folder
coded_value_domain_export_mode

Indicates what method will be used to export coded domain values.

  • VALUES —Exports coded domain values as raw values. This is the default.
  • DESCRIPTIONS —Exports coded domain values using their descriptions rather than raw values.
  • VALUES_AND_DESCRIPTIONS — Exports coded domain values as raw values and string descriptions
String
conversion_method

Indicates which conversion method will be applied.

  • DEFENSE_BY_SUBTYPE —Creates a shapefile based on subtype name, exports attributes applicable to that subtype, and removes trailing underscores from fields. This is the default.
  • DEFENSE_BY_FEATURECLASS —Creates a shapefile based on the feature class name and removes trailing underscores from fields.
  • GENERIC_BY_FEATURECLASS — Creates a shapefile for each feature class selected. The shapefile name matches the feature class name.
  • GENERIC_BY_SUBTYPE — Creates a shapefile for each subtype of the feature class selected. The shapefile name matches the subtype name.
  • MGCP — Creates a shapefile based on the feature class subtype. The shapefile is named using the geometry type and feature code. For example, the River subtype in the WatrcrsL feature class would be exported to a shapefile called LBH140.
String
create_empties

Indicates that the tool will create empty shapefiles if the input feature classes are also empty.

  • CREATE_EMPTIES —Create empty shapefiles if the corresponding feature classes to export are empty.
  • NO_CREATE_EMPTIES —Do no create empty shapefiles if the corresponding feature classes to export are empty. This is the default.
Boolean

代码示例

GeodatabaseToShape example (stand-alone script)

The following stand-alone script demonstrates how to use the GeodatabaseToShape tool.

# Name: GeodatabaseToShape_Example.py
# Description: Exports feature classes from an MGCP workspace to shapefiles
# Requirements: Defense Mapping extension

# Import arcpy module
import arcpy

# Check out a DefenseMapping extension license
arcpy.CheckOutExtension("defense")

# Local variables
inFeatures = "C:\\Data\\Defense\\MGCP_TRD3.mdb\\MGCP\\AerofacA;C:\\Data\\Defense\\MGCP_TRD3.mdb\\MGCP\\AerofacP;C:\\Data\\Defense\\MGCP_TRD3.mdb\\MGCP\\AgristrA;C:\\Data\\Defense\\MGCP_TRD3.mdb\\MGCP\\AgristrP"
inShapeFolder = "C:\\Data\\Shapefiles"
inOutputType = "Values"
inConversionMethod = "MGCP"

# Execute Geodatabase To Shape function
arcpy.GeodatabaseToShape_defense(inFeatures, inShapeFolder, inOutputType, inConversionMethod)

# Check in the Defense Mapping extension
arcpy.CheckInExtension("defense")

环境

  • 当前工作空间

许可信息

  • ArcGIS Desktop Basic: 否
  • ArcGIS Desktop Standard: 需要 Defense Mapping
  • ArcGIS Desktop Advanced: 需要 Defense Mapping

相关主题

  • An overview of the Geodatabase toolset

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS 平台

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2017 Esri. | 隐私政策 | 法律声明