Geodatabase To Shape (Topographic Production)

Zusammenfassung

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.

Verwendung

  • The Conversion Method parameter specifies the export mode.

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

Parameter

BeschriftungErläuterungDatentyp
Input 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

Specifies the method that 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

Specifies the conversion method that will be applied.

  • Defense by feature classA shapefile will be created based on the feature class name and trailing underscores will be removed from fields.
  • Defense by subtypeA shapefile will be created based on the subtype name, attributes applicable to that subtype will be exported, and trailing underscores will be removed from fields. This is the default.
  • Generic by feature classA shapefile will be created for each feature class selected. The shapefile name must match the feature class name.
  • Generic by subtypeA shapefile will be created for each subtype of the feature class selected. The shapefile name must match the subtype name.
  • MGCPA shapefile will be created based on the feature class subtype. The exported shapefile will be named using the geometry type prefix, for example, S for surface features, L for line features, P for point features, and the feature code. For example, the river subtype BH140 in the WatrcrsL feature class would be exported to a shapefile named LBH140.
  • MUVDA shapefile will be created based on the feature class subtype. The exported shapefile will be named using the geometry type prefix, for example, S for surface features, C for curve features, P for point features, and the feature code. For example, the river subtype BH140 in the WatercrsL feature class would be exported to a shapefile named CBH140.
String
Create Empty Shapefiles

Specifies whether empty shapefiles will be created if the input feature classes are empty.

  • Checked—Empty shapefiles will be created if the corresponding feature classes to be exported are empty.
  • Unchecked—Empty shapefiles will not be created if the corresponding feature classes to be exported are empty. This is the default.
Boolean

Abgeleitete Ausgabe

BeschriftungErläuterungDatentyp
Derived Folder

Folder containing output shapefiles created from input_features.

Folder

arcpy.topographic.GeodatabaseToShape(in_features, output_folder, coded_value_domain_export_mode, conversion_method, create_empties)
NameErläuterungDatentyp
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

Specifies the method that 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

Specifies the conversion method that will be applied.

  • DEFENSE_BY_FEATURECLASSA shapefile will be created based on the feature class name and trailing underscores will be removed from fields.
  • DEFENSE_BY_SUBTYPEA shapefile will be created based on the subtype name, attributes applicable to that subtype will be exported, and trailing underscores will be removed from fields. This is the default.
  • GENERIC_BY_FEATURECLASSA shapefile will be created for each feature class selected. The shapefile name must match the feature class name.
  • GENERIC_BY_SUBTYPEA shapefile will be created for each subtype of the feature class selected. The shapefile name must match the subtype name.
  • MGCPA shapefile will be created based on the feature class subtype. The exported shapefile will be named using the geometry type prefix, for example, S for surface features, L for line features, P for point features, and the feature code. For example, the river subtype BH140 in the WatrcrsL feature class would be exported to a shapefile named LBH140.
  • MUVDA shapefile will be created based on the feature class subtype. The exported shapefile will be named using the geometry type prefix, for example, S for surface features, C for curve features, P for point features, and the feature code. For example, the river subtype BH140 in the WatercrsL feature class would be exported to a shapefile named CBH140.
String
create_empties

Specifies whether empty shapefiles will be created if the input feature classes are empty.

  • CREATE_EMPTIESEmpty shapefiles will be created if the corresponding input feature classes are empty.
  • NO_CREATE_EMPTIESEmpty shapefiles will not be created if the corresponding input feature classes are empty. This is the default.
Boolean

Abgeleitete Ausgabe

NameErläuterungDatentyp
derived_folder

Folder containing output shapefiles created from input_features.

Folder

Codebeispiel

GeodatabaseToShape example (stand-alone script)

The following stand-alone script demonstrates how to use the GeodatabaseToShape function 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')

Lizenzinformationen

  • Basic: Nein
  • Standard: Erfordert Production Mapping
  • Advanced: Erfordert Production Mapping

Verwandte Themen