Calculate UTM Zone (Cartography)

Summary

Calculates a UTM zone of each feature based on the center point and stores this spatial reference string in a specified field. This field can be used in conjunction with Data Driven Pages to update the spatial reference to the correct UTM zone for each map.

Usage

Syntax

CalculateUTMZone_cartography (in_features, in_field)
ParameterExplanationData Type
in_features

Input feature layer.

Feature Layer
in_field

String field that stores the spatial reference string for the coordinate system. Field should have sufficient length (more than 600 characters) to hold the spatial reference string.

Field

Code Sample

CalculateUTMZone tool Example (Python Window)

Calculates a custom UTM zone for a set of features.

import arcpy
from arcpy import env
arcpy.env.workspace = "C:\Data\ProjectData.gdb"
arcpy.CalculateUTMZone_cartography("US_Counties", "UTM_Zone")
CalculateUTMZone tool Example (Stand-alone Python script)

Calculates a custom UTM zone for a set of features.

# Name: calculateutmzone_example.py
# Description: Calculates a custom UTM zone for a set of features

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
arcpy.env.workspace = "C:\Data\ProjectData.gdb"

# Set local variables
inFeatures = "US_states"
utmField = "UTM_zone"

# Execute CalculateUTMZone
arcpy.CalculateUTMZone_cartography(inFeatures, utmField)

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

11/11/2011