Generate Geodatabase From Excel (Topographic Production)

Краткая информация

Creates a geodatabase from the contents of a Microsoft Excel file (.xls or .xlsx).

This tool can only be run with a properly formatted Excel file.

Использование

  • The schema specific Excel files are included with the ArcGIS Defense Mapping and ArcGIS Production Mapping Desktop product data files.

  • The Excel file that is used to generate a geodatabase consists of multiple worksheets based on the components of the geodatabase. The individual worksheets in the file contain the spatial reference, datasets, object classes, subtypes, fields, domains, and metadata to be included in the database.

  • The Excel worksheets have a specific format and items such as the column names cannot be changed. Only the information in the worksheets can be changed.

Параметры

ПодписьОписаниеТип данных
Input Excel File

The Excel file that will be used to generate the geodatabase.

File
Output Geodatabase

The geodatabase that will be generated from the Excel file.

Workspace

Производные выходные данные

ПодписьОписаниеТип данных
Updated Geodatabase

The updated geodatabase.

Workspace

arcpy.topographic.GenerateGeodatabaseFromExcel(in_excel_file, out_geodatabase)
ИмяОписаниеТип данных
in_excel_file

The Excel file that will be used to generate the geodatabase.

File
out_geodatabase

The geodatabase that will be generated from the Excel file.

Workspace

Производные выходные данные

ИмяОписаниеТип данных
updated_geodatabase

The updated geodatabase.

Workspace

Пример кода

GenerateGeodatabaseFromExcel example (Python window)

The following Python window script demonstrates how to use the GenerateGeodatabaseFromExcel function.

# Name: GenerateGeodatabseFromExcel_sample.py
# Description: Uses the contents of a Microsoft Excel file (.xls or .xlsx) to create a geodatabase

# Import System Modules
import arcpy

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

# Setting the environment
arcpy.env.overwriteOutput = True

# Setting Local Variables
in_excel_file = r'C:\Data\Excel\MGCP_TRD_4_6.xls'
out_geodatabase = r'C:\Data\GDB\MGCP_TRD_4_6.gdb'

# Execute Generate Geodatabase From Excel
arcpy.topographic.GenerateGeodatabaseFromExcel(in_excel_file, out_geodatabase)

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

Параметры среды

Этот инструмент не использует параметры среды геообработки

Информация о лицензиях

  • Basic: Нет
  • Standard: Обязательно Production Mapping
  • Advanced: Обязательно Production Mapping

Связанные разделы