Resumen
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.
Uso
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.
Sintaxis
GeodatabaseToShape(in_features, output_folder, coded_value_domain_export_mode, conversion_method, create_empties)
Parámetro | Explicación | Tipo de datos |
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 |
Salida derivada
Nombre | Explicación | Tipo de datos |
derived_folder | Folder containing output shape files created from input_features. | Folder |
Muestra de código
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')
Entornos
Información de licenciamiento
- Basic: No
- Standard: Requiere Production Mapping
- Advanced: Requiere Production Mapping