Résumé
Automates the process of producing a layout or map based on a standard specification.
Remarque :
A product file installer is available for ArcGIS Production Mapping and ArcGIS Defense Mapping. The product files contain predefined layout PAGX templates that can be used for cartographic production.
Learn more about Defense Mapping product files and Production Mapping product files.
Utilisation
The Product parameter list is provided as part of the product files installation and contains supported products and their properties. This is also the source of the list of versions supported for a selected product.
The tool will create feature classes and feature datasets in the Input Geodatabase as it creates the finished layout product.
The template layers in the Input Geodatabase must adhere to the data model of the selected product. For example, if the MTM product was selected, the template must have layers in it pointing to feature classes based on the MTM data model, and the Input Geodatabase must adhere to the MTM data model.
If the tool encounters an Input Geodatabase layer for which it cannot find a matching feature class, a warning is provided and that layer will include a broken data source in the final layout template.
Syntaxe
GenerateProductLayout(geodatabase, aoi_layer, product, version, output_location, {rasters}, {template})
Paramètre | Explication | Type de données |
geodatabase | The input geodatabase that contains the features for the final map product. The schema of the workspace must match the schema of the product selected. | Workspace |
aoi_layer | A polygon feature layer that describes the processing extent. The feature layer must have only one feature selected or must be a feature class with only one feature. | Feature Layer |
product | The list of supported map products. | String |
version | The list of supported versions for the selected product. | String |
output_location | The full folder path to which the output .pagx file will be written. | Folder |
rasters [rasters,...] (Facultatif) | The input rasters used if the product requires an elevation guide surround element to calculate the elevation bands and spot height features. If you specify more than one raster, the rasters must have the same cell size, band number, and pixel type. If no raster is specified, the tool will not process the elevation guide data frame and will give a warning. | Raster Layer |
template (Facultatif) | The layout template to be used. If no layout template is specified, the default layout template for the product will be used. | Layout |
Sortie dérivée
Nom | Explication | Type de données |
out_template | The template representing the final topographic map. | Layout |
Exemple de code
The following Python window script demonstrates how to use the GenerateProductLayout function to automate the process of producing a layout or map based on a standard specification.
# Name: GenerateProductLayout_sample.py
# Description: Automates the process of producing a layout or map based on a standard specification.
# Import System Modules
import arcpy
# Check Out Extensions
arcpy.CheckOutExtension('Foundation')
arcpy.CheckOutExtension('Spatial')
# Setting the environment
arcpy.env.overwriteOutput = True
# Making AOI Feature Layer
Index = r'C:\Data\ReferenceData\MapIndex.gdb\MapIndex\TLM50_Index'
arcpy.management.MakeFeatureLayer(Index, "TLM50_Index")
# Selecting a single AOI from the AOI feature layer
selection_string = "NRN = 'V795X16573'"
arcpy.management.SelectLayerByAttribute("TLM50_Index", "NEW_SELECTION", selection_string)
# Setting Local Variables
geodatabase = r'C:\Data\MGCP_TRD_4_5.gdb'
aoi_layer = "TLM50_Index"
product = "MTM50"
version = "TRD_4_5"
output_location = r'C:\Data\Output'
rasters = r'C:\Data\Monterey.dt2'
template = r'C:\Data\MTM50_Layout.pagx'
# Calling the Extract Data By Feature tool to extract Structure Point features to a target file geodatabase
arcpy.topographic.GenerateProductLayout(in_datasets, target_gdb, reuse_schema, filter_feature, filter_type, checkout_replica, replica_name)
# 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')
arcpy.CheckInExtension('Spatial')
Environnements
Informations de licence
- Basic: Non
- Standard: Requiert Production Mapping and Extension ArcGIS Spatial Analyst
- Advanced: Requiert Production Mapping and Extension ArcGIS Spatial Analyst
Rubriques connexes
Vous avez un commentaire à formuler concernant cette rubrique ?