Import Generalization Data (Topographic Production)

Zusammenfassung

Imports data from a production schema to a themed generalization database using generalization rules defined in a Microsoft Excel spreadsheet.

Hinweis:

A product file installer is available for ArcGIS Production Mapping and ArcGIS Defense Mapping. The product files contain predefined generalization XLSM rule files, but the tool supports both XLSX and XLSM.

Learn more about Defense Mapping product files and Production Mapping product files.

Verwendung

  • Geoprocessing models that contain logic for the generalization of data from one scale to a smaller scale are provided as part of the Production Mapping product files. These models are designed to use an optimized generalization database organized by data themes. The Generalization Rule File contains the logic for mapping production schema to a theme database that can be used by these models.

  • You can customize the generalization configuration using the spreadsheet without modifying the complex geoprocessing models that will perform the generalization.

  • It is recommended that you use an empty geodatabase as the target geodatabase. Feature classes or tables in the target geodatabase that match generalization rules will be deleted.

  • Features in your production schema may be used for multiple themes, so this tool should be run to import one theme of data at a time. It is important to ensure that once one theme of data has been generalized, the results of the generalization are converted back to the production schema before the next theme of data is imported.

    For example, roads can be generalized as part of the transportation theme and also used as barriers in the structure theme to ensure simplified buildings do not cross roads. If the transportation theme is generalized first, many local streets can be removed. Converting back to the production schema before creating the structure theme features ensures that the removed roads are not used as part of comparisons when simplifying buildings.

  • Generalized data can be converted back to the production schema using the Export Generalized Data tool.

Parameter

BeschriftungErläuterungDatentyp
Input Geodatabase

The geodatabase containing data in a production schema.

Workspace
Target Geodatabase

The target geodatabase where the data optimized for generalization will be loaded.

Workspace
Generalization Rule File

The Excel file containing the generalization rules. This file defines features participating in the generalization process and determines the data that will be loaded and how it is organized. An example rule file is provided in the product file downloads for Defense Mapping and Production Mapping.

File
Data Theme

A theme that specifies the type of data to be generalized. Available themes are automatically populated from the Generalization Rule File parameter. The values provided in the example rule file are as follows:

  • TRANS—A data theme that groups features in a transportation network such as roads and railways.
  • STRUCTURE—A data theme that groups structural features such as buildings.
  • HYDRO—A data theme that groups water features such as lakes and rivers.
  • SOE—A skin of the earth data theme that groups polygon features that cover the entire surface of the earth with no holes or gaps. It can consist of water, vegetation, land, and artificial features.
  • GENERAL—A data theme that groups features other than those defined by another theme.

String

Abgeleitete Ausgabe

BeschriftungErläuterungDatentyp
Updated Geodatabase

The updated target geodatabase.

Workspace

arcpy.topographic.ImportGeneralizationData(input_geodatabase, target_geodatabase, rule_file, data_theme)
NameErläuterungDatentyp
input_geodatabase

The geodatabase containing data in a production schema.

Workspace
target_geodatabase

The target geodatabase where the data optimized for generalization will be loaded.

Workspace
rule_file

The Excel file containing the generalization rules. This file defines features participating in the generalization process and determines the data that will be loaded and how it is organized. An example rule file is provided in the product file downloads for Defense Mapping and Production Mapping.

File
data_theme

A theme that specifies the type of data to be generalized. Available themes are automatically populated from the Generalization Rule File parameter. The values provided in the example rule file are as follows:

  • TRANS—A data theme that groups features in a transportation network such as roads and railways.
  • STRUCTURE—A data theme that groups structural features such as buildings.
  • HYDRO—A data theme that groups water features such as lakes and rivers.
  • SOE—A skin of the earth data theme that groups polygon features that cover the entire surface of the earth with no holes or gaps. It can consist of water, vegetation, land, and artificial features.
  • GENERAL—A data theme that groups features other than those defined by another theme.

String

Abgeleitete Ausgabe

NameErläuterungDatentyp
updated_geodatabase

The updated target geodatabase.

Workspace

Codebeispiel

ImportGeneralizationData example (stand-alone script)

The following stand-alone sample script demonstrates how to use the ImportGeneralizationData tool to import feature classes from the generalization database to the theme database.

# Name: ImportGeneralizationData_sample.py
# Description: This tool imports necessary feature classes from the generalization database into the theme database

# Import System Modules
import arcpy

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

# Setting the environment
arcpy.env.overwriteOutput = True

# Setting Local Variables
input_database = r'C:\Data\Generalization.gdb'
target_database = r'C:\Data\STRUCTURE.gdb'
rule_file = r'C:\Data\CTM50K_GeneralizationRules.xlsx'
theme = 'STRUCTURE'

# Calling the Import Generalization Data to import structure features into the STRUCTURE.gdb
arcpy.topographic.ImportGeneralizationData(input_database, target_database, rule_file, theme)

# Getting all messages, warnings, and errors from the tool run and printing the results back to the user
messages = arcpy.GetMessages(0)
warnings = arcpy.GetMessages(1)
errors = arcpy.GetMessages(2)
arcpy.AddMessage('Tool Messages: {}\nTool Warnings: {}\nTool Errors{}\n'.format(messages, warnings, errors))

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

Umgebungen

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Lizenzinformationen

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

Verwandte Themen