HOW TO

Update existing point features based on new XY coordinates in ArcGIS Pro

Last Published: February 7, 2025

Summary

In ArcGIS Pro, the Shape field is a geometry data type that stores the geometry of a feature layer. Modifying the XY coordinates in the attribute table does not automatically update the Shape field. As a result, existing point features do not reflect the new XY coordinates. To ensure the locations of the point features are updated on the map, the Shape field must be updated.

This article provides the workflow to update the existing point features based on the new XY coordinates by configuring the Shape field using the Calculate Field tool. In this example, the XY coordinates are stored in the X_new and Y_new fields. The map below shows the point features with the XY coordinates in the attribute table.

The point features and attribute table

The map below shows the locations of the point features are not updated after modifying the XY coordinates.

The point features with the updated XY coordinates

Procedure

Note:
The Calculate Field tool modifies the input data by changing values in the attribute fields. Refer to ArcGIS Pro: Tools that modify or update the input data for more information. To enable undo, toggle the Enable Undo option in the Calculate Field window before running the tool.
  1. Open the ArcGIS Pro project.
  2. In the Contents pane, right-click the point feature layer and click Attribute Table.
  3. Configure the Shape field using the Calculate Field tool.
    1. In the attribute table, right-click the Shape field header and click Calculate Field.
    2. In the Calculate Field window, for Expression Type, select Python.
    3. Under the Expression section, specify the following script in the expression box. Replace X_field and Y_field with the fields storing the X and Y coordinates.
XYsetVALUE(!Shape!,!<X_field>!,!<Y_field>!)
  1. In the Code Block box, specify the following script.
def XYsetVALUE(Shape,<X_field>,<Y_fileld>):
   point = Shape.getPart(0)
   point.X = <X_field>
   point.Y = <Y_field>
   return point
  1. Click Verify to validate the expression.
  2. Click OK.
The Calculate Field window
Note:
Alternatively, use the XY Table To Point tool to create a new point feature layer with the new XY coordinates instead of updating the existing point feature layer. Refer to ArcGIS Pro: Add x,y coordinate data as a layer for instructions.

The map below shows the point features are updated to reflect the new XY coordinates after configuring the Shape field.

The point features updated after modifying the Shape field

Article ID: 000034569

Software:
  • ArcGIS Pro 3 3
  • ArcGIS Pro 3 2
  • ArcGIS Pro 3 4

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options