概要
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.
| String |
conversion_method | Indicates which conversion method will be applied.
| String |
create_empties | Indicates that the tool will create empty shapefiles if the input feature classes are also empty.
| Boolean |
派生した出力
名前 | 説明 | データ タイプ |
derived_folder | Folder containing output shape files created from input_features. | Folder |
コードのサンプル
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