描述
Calculates representation symbology and field labels for nautical charts.
ArcGIS Maritime symbology tools are based on representations, which are the symbols that represent features and text fields in the map text display. The calculated representations and text fields use combinations of feature attributes to determine the symbols for particular features in a feature class.
使用方法
INT 1 fields are calculated using a collection of rules that are managed in the INT1.cxml specification file in the following location:
- For 32-bit Windows operating systems—<Install location>\Program Files\ArcGIS\MaritimeCharting\Desktop<version>\Common\Symbology
- For 64-bit Windows operating systems—<Install location>\Program Files (x86)\ArcGIS\MaritimeCharting\Desktop<version>\Common\Symbology
The feature class representations must already exist in the geodatabase. Representations are added by updating nautical symbology.
Representation symbol information is managed in the INT1.Style file and is installed in the following location:
- For 32-bit Windows operating systems—<Install location>\Program Files\ArcGIS\Desktop<version>\Styles
- For 64-bit Windows operating systems—<Install location>\Program Files (x86)\ArcGIS\Desktop<version>\Styles
语法
arcpy.nautical.CalculateSymbology(selected_symbology, target_feature_classes, {preserve_free_representations})
参数 | 说明 | 数据类型 |
selected_symbology | Specifies the ArcGIS Maritime visual specification that will be calculated.
| String |
target_feature_classes | The feature classes in which symbols will be calculated. | Feature Class; Feature Layer |
preserve_free_representations (可选) | Specifies whether free representations will be preserved.
| Boolean |
代码示例
CalculateSymbology example (Python window)
The following Python window script demonstrates how to use the CalculateSymbology function.
import arcpy, os, traceback
#Set workspace
arcpy.env.workspace = r'C:\Data\CalculateSymbologyTesting\ChartSchema.gdb'
prod_db = arcpy.env.workspace
#Nautical FDS path
naturalA = os.path.join(prod_db, "Nautical", "NaturalFeaturesA")
# Check for Production Mapping extension
if arcpy.CheckExtension("Foundation") == "Available":
arcpy.CheckOutExtension("Foundation")
else:
raise ex("Production Mapping license is unavailable.")
# Check for Nautical extension
if arcpy.CheckExtension("Nautical") == "Available":
arcpy.CheckOutExtension("Nautical")
else:
raise ex("Maritime: Charting license is unavailable.")
try:
print "Running calculate symbology..."
#Execute tool
arcpy.CalculateSymbology_nautical("INT1",naturalA,"PRESERVE_FREE_REPRESENTATIONS")
print "complete"
except ex, (instance):
print "Error 1"
arcpy.AddError(instance.parameter)
except arcpy.ExecuteError:
# Get the geoprocessing error messages
msgs = arcpy.GetMessage(0)
msgs += arcpy.GetMessages(2)
# Return gp error messages for use with a script tool
arcpy.AddError(msgs)
except:
# Get the traceback object
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
print tbinfo
环境
许可信息
- Basic: 否
- Standard: 否
- Advanced: 需要 ArcGIS Maritime