Summary
Runs selected chart-finishing processes on a production database with the Nautical Chart schema. Processes include adding layers to the TOC, generating cartographic limits, creating grids and graticules, converting labels to annotation, calculating symbology, and masking annotation.
A description of each process can be found in Chart automation finishing processes.
Usage
The selected chart-finishing processes can be run on a chart product that was created by importing data into a database with the Nautical Chart schema.
There are two options for choosing the map document on which Chart Automation will be run: A path to an existing map document stored on a local machine or on some other machine to which you have write access; or the current map document in ArcMap.
Any new layers added to the map document will be added to the active data frame unless one is selected from the optional Data Frame parameter.
The group layer added by the Add Layers to TOC process is named Nautical.lyr and is installed with ArcGIS Maritime in the following location:
- For 64-bit Windows operating systems—<Install location>\Program Files (x86)\ArcGIS\MaritimeCharting\Desktop<version>\Charting\Cartography\Symbology
- For 32-bit Windows operating systems—<Install location>\Program Files\ArcGIS\MaritimeCharting\Desktop<version>\Charting\Cartography\Symbology
The output grids are stored in the GRD_Grids feature dataset in the production database, and the grid layers are added to the map document under a group layer named Grids.
The selected features using the Generate Cartographic Limits tool process are converted to polylines and erased where their boundary is coincident with a CoastlineL feature.
The Calculate Symbology geoprocessing tool is run to apply INT1 to features.
Using the Convert Labels To Annotation tool process, if the labels are turned on in the layer’s properties, feature-linked annotation is generated for that layer at the reference scale of the data frame, and the labels for that layer are then turned off.
The output annotation feature classes are stored in the production database, and the annotation layers are added to the map document under a group layer named Anno.
Syntax
arcpy.nautical.ChartAutomation(Chart_Finishing_Processes, Chart_Scale, Chart_Database, Map_Document_Type, ArcMap_Document, {Area_Of_Interest}, {Data_Frame}, {Primary_Coordinate_System})
Parameter | Explanation | Data Type |
Chart_Finishing_Processes [Chart_Finishing_Processes,...] | Specifies the finishing processes that will be run.
| String |
Chart_Scale | The scale of the chart product. For example, if the scale is 1:20,000, you would enter 20000. | Double |
Chart_Database | The geodatabase that contains the chart data in the Nautical Chart schema. | Workspace |
Map_Document_Type | Specifies the map document where the chart-finishing processes will run.
| String |
ArcMap_Document | The path to the ArcMap Document where the Chart_Finishing_Processes will run. If CURRENT_MXD is chosen for the Map_Document_Type parameter, this parameter will be ignored. | ArcMap Document |
Area_Of_Interest (Optional) | The polygon layer that contains the area of interest for the chart extent. The layer should contain exactly one feature, or exactly one feature should be selected. This is the feature that will be used as the Area Of Interest. | Layer |
Data_Frame (Optional) | The name of the data frame in the selected ArcMap Document on which the Chart Finishing Processes will run. If no value is specified, the active data frame will be used. | String |
Primary_Coordinate_System (Optional) | The primary coordinate system for the grid layer being created. This coordinate system must be a projected coordinate system. | Spatial Reference |
Code sample
ChartAutomation example (stand-alone script)
The following code sample demonstrates how to use the ChartAutomation tool with a database using the Nautical Chart schema.
# Variables
finishing_processes="Add Layers to TOC;Create Grids and Graticules;Generate Cartographic Limits;Generate Light Sectors;Bubble Up Spatial Attributes;Calculate Symbology;Convert Labels to Annotation; Mask Annotation"
aoi = r"C:\Data\Charts\AOI.lyr"
scale = 52000
prod_db = r"C:\Data\Charts\GB4X0000.gdb"
mxd_type = "PATH_TO_MXD"
mxd_path = r"C:\Data\Charts\MyNauticalChart.mxd"
df_name = "MainPanel"
proj = r"C:\Data\Charts\WGS_1984_World_Mercator (Calculated).prj"
# Execute the tool
arcpy.ChartAutomation_nautical(finishing_processes, scale, prod_db, mxd_type, mxd_path, aoi, df_name, proj)
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Requires ArcGIS Maritime