GeoNames To Geodatabase (Topographic Production)

摘要

Loads GeoNames data into a feature class and table. The feature class is composed of point features, and the table contains fields with information concerning the naming conventions used for the features. The feature class contains the Unique Feature Identifier (UFI) and Unique Name Identifier (UNI) fields, which match the same fields in the GeoNames table.

使用情况

  • This tool is designed to work with downloadable files from the National Geospatial-Intelligence Agency (NGA) Geographic Names Server and defaults to the NGA GeoNames schema.

  • Before loading the GeoNames data into a database, the feature class and table must already exist.

  • If your organization has an existing GeoNames database, you can use it as long as it includes the UFI and UNI fields.

参数

标注说明数据类型
GeoNames Source File

The path to the source file containing the GeoNames information. This must be a properly formatted GeoNames file.

Shapefile; Text File
GeoNames Feature Class Name

The GeoNames feature class. This feature class is in the working database.

Feature Class
Allow Duplicates

Specifies whether duplicate features will be imported to the GeoNames feature class.

  • Checked—Features with the same geometry and attributes will be imported.
  • Unchecked—Features with the same geometry and attributes will not be imported. This is the default.
Boolean
GeoNames Table Name

The GeoNames table. This table is in the working database.

Table
Matching Fields
(可选)

Specific fields in the GeoNames source file that will be mapped to fields in the GeoNames feature class and table.

Value Table

派生输出

标注说明数据类型
Out feature class

Output feature class containing GeoName features.

Feature Class
Out table

Output table containing attribution for GeoName features.

Table

arcpy.topographic.GeoNamesToGeodatabase(in_source, in_feature_class, in_allow_duplicates, in_table, {match_fields})
名称说明数据类型
in_source

The path to the source file containing the GeoNames information. This must be a properly formatted GeoNames file.

Shapefile; Text File
in_feature_class

The GeoNames feature class. This feature class is in the working database.

Feature Class
in_allow_duplicates

Specifies whether duplicate features will be imported to the GeoNames feature class.

  • ALLOW_DUPLICATESFeatures with the same geometry and attributes will be imported.
  • DON'T_ALLOW_DUPLICATESFeatures with the same geometry and attributes will not be imported. This is the default.
Boolean
in_table

The GeoNames table. This table is in the working database.

Table
match_fields
[match_fields,...]
(可选)

Specific fields in the GeoNames source file that will be mapped to fields in the GeoNames feature class and table.

Value Table

派生输出

名称说明数据类型
out_featureclass

Output feature class containing GeoName features.

Feature Class
out_table

Output table containing attribution for GeoName features.

Table

代码示例

GeoNamesToGeodatabase example (stand-alone script)

The following stand-alone script demonstrates how to use the GeoNamesToGeodatabase function to import GeoNames from a properly formatted text file to a selected GeoNames feature class and table.

# Name: GeoNamesToGeodatabase_sample.py
# Description: Use the GeoNames To Geodatabase tool to import GeoNames from a properly formatted text file to a selected GeoNames feature class and table

# Import System Modules
import arcpy

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

# Setting Local Variables
in_source = r'C:\Data\Aruba.txt'
in_feature_class = r'C:\Data\Geonames_Template_Script1.gdb\GeoNames_FeaturesP'
in_allow_duplicates = "DON'T_ALLOW_DUPLICATES"
in_table = r'C:\Data\Geonames_Template_Script1.gdb\GEONAMES_TABLE'
match_fields = 'adm1 adm1 adm1;lat_dd lat_dd lat_dd;long_dd long_dd long_dd;ufi ufi ufi;uni uni uni'

# Use the GeoNames To Geodatabase tool to import GeoNames from a properly formatted text file
arcpy.topographic.GeoNamesToGeodatabase(in_source, in_feature_class, in_allow_duplicates, in_table, match_fields)

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

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 否
  • Standard: 需要 Production Mapping
  • Advanced: 需要 Production Mapping

相关主题