Apply Maritime Symbology (Maritime)

获得 ArcGIS Maritime 许可后可用。

摘要

Applies maritime paper chart symbols to layers based on a CXML format file that contains rules.

使用情况

  • Rules must be defined in the .cxml file before using this tool.

    Learn more about using CXML to customize maritime symbology

  • The Symbol_C field is calculated using a collection of rules that are managed in the INT1.cxml specification file.

  • The text string in the Symbol_C field must match the symbol classes configured in the Symbology pane; otherwise, symbols will appear red.

  • Python expressions used in the .cxml file can reference external files through the expressionFile tag. Referenced files may include the full path to the file. If not, the search path must include the following:

    • The folder location for the .cxml file provided for the input parameter.
    • The location where the ArcGIS Maritime Pro product files are installed.

  • It is recommended that you use the Nautical.lyrx file and update data sources to render the chart after using the tool.

    订阅:

    The ArcGIS Maritime product file installer contains predefined .cxml, layer, and style files that can be used for paper chart production. The Nautical.lyrx file is configured with symbols that correspond to the symbol names used in the .cxml file.

  • If the preconfigured Nautical.lyrx file is not needed, you can use the Match Layer Symbology To A Style tool to symbolize the layers after using this tool.

参数

标注说明数据类型
Target Features

The input point, line, or polygon features.

Feature Class; Feature Layer
Symbology CXML File

The .cxml file that contains rules for applying symbology.

File

派生输出

标注说明数据类型
Updated Features

The updated Target Features.

Feature Class; Feature Layer

arcpy.maritime.ApplyMaritimeSymbology(target_features, cxml_file)
名称说明数据类型
target_features
[target_features,...]

The input point, line, or polygon features.

Feature Class; Feature Layer
cxml_file

The .cxml file that contains rules for applying symbology.

File

派生输出

名称说明数据类型
updated_features

The updated target_features.

Feature Class; Feature Layer

代码示例

ApplyMaritimeSymbology example (stand-alone script)

The following stand-alone script demonstrates how to use the ApplyMaritimeSymbology function.

# Import os
import os 


# Import arcpy module
import arcpy 

 
# Set the workspace 
arcpy.env.workspace = r"C:\ChartSchema.gdb" 


# Use the ListDatasets function to return a list of feature datasets then list of feature classes 
datasets = arcpy.ListDatasets(feature_type='feature') 
featureclasses = arcpy.ListFeatureClasses(feature_dataset='Nautical') 

# Use the list of feature classes for Apply Maritime Symbology tool 
arcpy.maritime.ApplyMaritimeSymbology(featureclasses,r'C:\ProductFiles\ArcGIS Maritime\Product Files\3.1\Charting\INT1.cxml') 




$desktopversion\cmsfiles\py\Maritime\ApplyMaritimeSymbology.py

环境

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

许可信息

  • Basic: 否
  • Standard: 需要 ArcGIS Maritime
  • Advanced: 需要 ArcGIS Maritime

相关主题