Apply Building Offsets (Topographic Production)

Resumen

Aligns, moves, and hides building or bridge marker symbols based on product specification rules defined in an .xml file.

If this tool is run with a building offset XML rule file, it aligns, moves, and hides building marker symbols based on product specification rules defined in an .xml file. If this tool is run with a bridge offset XML rule file, it calculates the offsets necessary to properly display bridges at a given location.

For a bridge offset XML rule file, offsets can be calculated for either line bridge or point bridge features. For a line bridge feature, an offset will be calculated for the width of a bridge based on the overpassing feature that runs through the bridge.

For point bridges, offsets include the following:

  • The rotation angle of a bridge based on its overpassing feature
  • The position of the bridge if the original position is not coincident with the overpassing feature

Nota:

A product file installer is available for ArcGIS Production Mapping and ArcGIS Defense Mapping. The product files contain predefined XML rule files that can be used for cartographic production.

Learn more about Defense Mapping product files and Production Mapping product files.

Uso

  • The feature layers referenced in the rule file must have their symbology defined pursuant to the product specification using Arcade expressions.

  • The layers must have attribute-driven symbology enabled for marker symbols.

  • The tool will create an ABO_Rotation field in the Buildings table if one does not already exist and connect the rotation property of building marker symbols to this attribute.

  • When a point feature class is used for Input Bridge Features, the following double fields are added:

    • CBO_OffsetX—Apply the offset along the x-axis.
    • CBO_OffsetY—Apply the offset along the y-axis.
    • CBO_Rotation—Apply the rotation of the feature symbology.

  • When a line feature class is used for Input Bridge Features, the following double field is added:

    • CBO_Offset—Apply the offset to line features.

Sintaxis

arcpy.topographic.ApplyBuildingOffsets(in_map, rule_file)
ParámetroExplicaciónTipo de datos
in_map

The input map that contains the layers with proper symbology. This can be a map in the application or an .mapx file on disk.

Map
rule_file

An .xml file containing the offset rules that define how features will be aligned and refined in case of any conflict.

File

Salida derivada

NombreExplicaciónTipo de datos
updated_map

The updated map with modified building features and symbology.

Map

Muestra de código

ApplyBuildingOffsets example (Python window)

The following Python window script demonstrates how to use the ApplyBuildingOffsets function to align, move, and hide building marker symbols based on the MGCP XML rule file.

# Name: ApplyBuildingOffsets_sample.py
# Description: This script tool aligns, moves, and hides building marker symbols based
# on product specification rules defined in a rule xml file

# Import System Modules
import arcpy

# Check Out Extensions
arcpy.CheckOutExtension('Foundation')

# Setting the environment
arcpy.env.overwriteOutput = 1

# Setting Local Variables
in_map = r'C:\Data\MGCP_TRD_4_4.mapx'
rule_file = r'C:\Data\MTM50_TRD_4_4_BuildingOffsets.xml'

# Calling the Apply Building Offsets tool to align, move, and hide building marker symbols based
# on product specification rules defined in a rule xml file
arcpy.topographic.ApplyBuildingOffsets(in_map, rule_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')

Entornos

Esta herramienta no utiliza ningún entorno de geoprocesamiento.

Información de licenciamiento

  • Basic: No
  • Standard: No
  • Advanced: Requiere Production Mapping

Temas relacionados