Geodatabase To Shape (Topographic Production)

概要

Exports one or more feature classes in a geodatabase to shapefiles using one of three modes: defense, generic, and Multinational Geospatial Co-Production Program (MGCP).

Each mode controls how the output shapefiles are named. The defense and MGCP export modes follow Defense Mapping data model requirements. The generic mode uses the same logic as the Feature Class To Feature Class tool.

使用法

  • The Conversion Method parameter 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.

構文

arcpy.topographic.GeodatabaseToShape(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.

  • DESCRIPTIONSCoded domain values will be exported using their descriptions rather than raw values.
  • VALUESCoded domain values will be exported as raw values. This is the default.
  • VALUES_AND_DESCRIPTIONSCoded domain values will be exported as raw values and string descriptions
String
conversion_method

Indicates which conversion method will be applied.

  • DEFENSE_BY_FEATURECLASSCreates a shapefile based on the feature class name and removes trailing underscores from fields.
  • DEFENSE_BY_SUBTYPECreates a shapefile based on subtype name, exports attributes applicable to that subtype, and removes trailing underscores from fields. This is the default.
  • GENERIC_BY_FEATURECLASSCreates a shapefile for each feature class selected. The shapefile name matches the feature class name.
  • GENERIC_BY_SUBTYPECreates a shapefile for each subtype of the feature class selected. The shapefile name matches the subtype name.
  • MGCPCreates 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_EMPTIESCreate empty shapefiles if the corresponding input feature classes are empty.
  • NO_CREATE_EMPTIESDo not create empty shapefiles if the corresponding input feature classes are empty. This is the default.
Boolean

派生した出力

名前説明データ タイプ
derived_folder

Folder containing output shape files created from input_features.

Folder

コードのサンプル

GeodatabaseToShape example (stand-alone script)

The following stand-alone script demonstrates how to use the GeodatabaseToShape tool to export feature classes from an MGCP workspace to shapefiles.

# Name: GeodatabaseToShape_sample.py
# Description: Exports feature classes from an MGCP workspace to shapefiles

# Import System Modules
import arcpy

# Check Out Extensions
arcpy.CheckOutExtension('Foundation')

# Setting Local Variables
in_features = r'C:\Temp\Test.gdb\MGCP\AerofacA;C:\Temp\Test.gdb\MGCP\AerofacP;C:\Temp\Test.gdb\MGCP\AgristrA;C:\Temp\Test.gdb\MGCP\AgristrP'
in_shape_folder = r'C:\Temp\Shapefiles'
in_output_type = 'Values'
in_conversion_method = 'MGCP'

# Execute Geodatabase To Shape Function
arcpy.topographic.GeodatabaseToShape(in_features, in_shape_folder, in_output_type, in_conversion_method)

# Check In Extensions
arcpy.CheckInExtension('Foundation')

ライセンス情報

  • Basic: いいえ
  • Standard: 次のものが必要 Production Mapping
  • Advanced: 次のものが必要 Production Mapping

関連トピック