Add XY Coordinates (Coverage)


Adds the items X-COORD and Y-COORD for labels or points to the input coverage PAT, or for nodes to the input coverage NAT, and calculates their values.

The tool determines the feature classes of the input coverage and lists those available to which x,y coordinates can be added. The tool is most commonly used to gain access to a coverage's geometry to perform queries and analysis or to extract points or nodes based on their x,y location.


Add XY illustration



AddXY_arc (in_cover, {feature_type})
ParameterExplanationData Type

The coverage containing points or polygon labels whose x,y coordinates will become attributes in the PAT, or in the coverage containing nodes, to the NAT.


Type of coverage feature whose x,y coordinates will become feature attributes.

  • POINTPoint feature coordinates to be added to the PAT including label points. This is the default option.
  • NODENode feature coordinates to be added to the NAT.

Code Sample

AddXY example (stand-alone script)

The following stand-alone script demonstrates how to add X-COORD and Y-COORD items to a coverage's PAT. The items are populated with the coordinate values from the coverage's point features.

# Name:
# Description: Adds X and Y coordinates to a coverage's point attribute table
# Requirements: ArcInfo Workstation
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data"

# Set local variables
inCover = "wells"
featureType = "POINT"

#Execute AddXY
arcpy.AddXY_arc(inCover, featureType)


Related Topics

Licensing Information

ArcView: No
ArcEditor: No
ArcInfo: Requires ArcInfo Workstation installed

Published 6/8/2010