Geodatabase To Shape (Defense Mapping)
概要
Exports one or more feature classes in a Multinational Geospatial Co-production Program (MGCP) geodatabase to shapefiles.
使用法
-
The shapefiles are generated based on the feature class subtypes and are named using the geometry type and feature code. For example, the shapefile for the River subtype in the WatrcrsL feature class would be exported to a shapefile called LBH140.
Coded domain values are exported as part of the shapefile to maintain data integrity. You can choose to export them as raw values or string descriptions.
The shapefiles are Unicode compliant.
構文
パラメータ | 説明 | データ タイプ |
in_features [in_features,...] |
The feature layers used to create the shapefiles. | Feature Layer |
in_shape_folder |
The target location for the shapefiles. | Folder |
in_output_type |
Indicates what method will be used to export coded domain values.
| String |
コード サンプル
MGCP feature classes are exported from the MGCP_TRD2 geodatabase to a local directory.
# Name: GeodatabaseToShape.py # Description: Exports feature classes from an MGCP workspace to shapefiles # Author: ESRI # Date: June 2010 # Import arcpy module import arcpy # Check out a DefenseMapping extension license arcpy.CheckOutExtension("defense") # Import the Defense Mapping toolbox - you may have to alter this path arcpy.ImportToolbox(r"C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Defense Mapping Tools.tbx") # Local variables in_features = r"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" in_shape_folder = r"C:\Data\Shapefiles" in_output_type = "Values" # Execute Geodatabase To Shape function arcpy.GeodatabaseToShape_defense(in_features, in_shape_folder, in_output_type) # Check in the Defense Mapping extension arcpy.CheckInExtension("defense")