Generate Product Layout (Topographic Production)

Zusammenfassung

Automates the process of producing a layout or map based on a standard specification.

Hinweis:

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.

Verwendung

  • The Product parameter options are provided as part of the product files installation, which 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 value as it creates the finished layout product.

  • The template layers in the Input Geodatabase value must adhere to the data model of the selected product. For example, if the MTM product is selected, the template must include layers that point to feature classes based on the MTM data model, and the Input Geodatabase value 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 appears and that layer will include a broken data source in the final layout template.

  • The Preset File parameter is only available when the Output Type parameter is set to PDF or TIFF. You can create preset files in the Export pane when exporting layouts.

Parameter

BeschriftungErläuterungDatentyp
Input 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
Area Of Interest

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

Specifies the supported map product that will be used.

  • MTM50An MGCP Topographic Map at 1:50,000 cartographic product scale will be used.
  • MTM100A MGCP Topographic Map at 1:100,000 cartographic product scale will be used.
  • TM25A Topographic Map at 1:25,000 cartographic product scale will be used.
  • TM50A Topographic Map at 1:50,000 cartographic product scale will be used.
  • TM100A Topographic Map at 1:100,000 cartographic product scale will be used.
  • JOGAA Joint Operations Graphic at 1:250,000 cartographic product scale will be used.
  • CTM50A Civilian Topographic map at 1:50,000 cartographic product scale will be used.
String
Version

The supported versions of the selected product.

String
Output Location

The folder path to which the output file will be written.

Folder
Input Rasters
(optional)

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 elevation guide data frame will not be processed and a warning will appear.

Raster Layer; Mosaic Layer
Layout Template
(optional)

The layout template to be used. If no layout template is specified, the default layout template for the product will be used.

Layout
Output Type
(optional)

Specifies the type of output.

  • PAGXA layout file will be created. This is the default.
  • APRXAn ArcGIS Pro project file will be created.
  • PDFA .pdf file will be created.
  • TIFFA .tiff file will be created.
String
Preset File
(optional)

A file that defines a set of parameter values for the specified Output Type parameter value.

File

Abgeleitete Ausgabe

BeschriftungErläuterungDatentyp
Output File

The template representing the final topographic map.

Layout; File

arcpy.topographic.GenerateProductLayout(geodatabase, aoi_layer, product, version, output_location, {rasters}, {template}, {output_type}, {export_file})
NameErläuterungDatentyp
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

Specifies the supported map product that will be used.

  • MTM50An MGCP Topographic Map at 1:50,000 cartographic product scale will be used.
  • MTM100A MGCP Topographic Map at 1:100,000 cartographic product scale will be used.
  • TM25A Topographic Map at 1:25,000 cartographic product scale will be used.
  • TM50A Topographic Map at 1:50,000 cartographic product scale will be used.
  • TM100A Topographic Map at 1:100,000 cartographic product scale will be used.
  • JOGAA Joint Operations Graphic at 1:250,000 cartographic product scale will be used.
  • CTM50A Civilian Topographic map at 1:50,000 cartographic product scale will be used.
String
version

The supported versions of the selected product.

String
output_location

The folder path to which the output file will be written.

Folder
rasters
[rasters,...]
(optional)

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 elevation guide data frame will not be processed and a warning will appear.

Raster Layer; Mosaic Layer
template
(optional)

The layout template to be used. If no layout template is specified, the default layout template for the product will be used.

Layout
output_type
(optional)

Specifies the type of output.

  • PAGXA layout file will be created. This is the default.
  • APRXAn ArcGIS Pro project file will be created.
  • PDFA .pdf file will be created.
  • TIFFA .tiff file will be created.
String
export_file
(optional)

A file that defines a set of parameter values for the specified output_type parameter value.

File

Abgeleitete Ausgabe

NameErläuterungDatentyp
out_template

The template representing the final topographic map.

Layout; File

Codebeispiel

GenerateProductLayout example (stand-alone script)

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'
output_type = 'PDF'
export_file = r'C:\Data\Preset\MTM50_Layout_Preset1.xprt'

# Calling the Generate Product Layout tool to produce a layout for a MTM50 product
arcpy.topographic.GenerateProductLayout(geodatabase, aoi_layer, product, version, output_location, rasters, template, output_type, export_file)

# 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')

Umgebungen

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Lizenzinformationen

  • Basic: Nein
  • Standard: Erfordert Production Mapping and ArcGIS Spatial Analyst extension
  • Advanced: Erfordert Production Mapping and ArcGIS Spatial Analyst extension

Verwandte Themen