Skip To Content

Add XY Coordinates


Adds the fields POINT_X and POINT_Y to the point input features and calculates their values. It also appends the POINT_Z and POINT_M fields if the input features are Z- and M-enabled.


Add XY Coordinates



    This tool modifies the input data. See Tools with no outputs for more information and strategies to avoid undesired data changes.

  • If the POINT_X, POINT_Y, POINT_Z, and POINT_M fields exist, their values are recalculated.

  • The output POINT_X and POINT_Y field values are based on the coordinate system of the dataset, not the coordinate system of the map display. To force the POINT_X and POINT_Y values to be in a coordinate system different than the input dataset, set the Output Coordinate System environment.

  • If points are moved after using Add XY Coordinates, their POINT_X and POINT_Y values, and POINT_Z and POINT_M values—if present—must be recomputed by running Add XY Coordinates again.

  • The Project tool does not modify the values of POINT_X, POINT_Y, POINT_Z, or POINT_M fields.

  • If the input features are in a geographic coordinate system, POINT_X and POINT_Y represent the longitude and latitude, respectively.


AddXY_management (in_features)
ParameterExplanationData Type

The point features whose x,y coordinates will be appended as POINT_X and POINT_Y fields.

Feature Layer

Code sample

AddXY example 1 (Python window)

The following Python window script demonstrates how to use the AddXY function in immediate mode.

import arcpy
from arcpy import env

env.workspace = "C:/data"
arcpy.Copy_management("climate.shp", "climateXYpts.shp")
AddXY example 2 (stand-alone Python script)

The following Python script demonstrates how to use the AddXY function in a stand-alone script.

# Name:
# Description: Adding XY points to the climate dataset

# Import system modules
import arcpy
from arcpy import env

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

# Set local variables
in_data= "climate.shp"
in_features = "climateXPpts2.shp"

# Copying data to preserve original dataset
# Execute Copy
arcpy.Copy_management(in_data, in_features)

# Execute AddXY

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics