Update points position based on new XY coordinates. ArcGIS Pro 2.8

1183
5
Jump to solution
11-16-2021 11:54 PM
MarcusNielsen
New Contributor II

 

Hello

I have created a points feature class from a spreadsheet with the Add data-> XY Point data.
I have since gotten an updated spreadsheet where some of the points have new X and Y coordinates. 

Is there a way to update the position of the old points based on the new coordinates?

 

Thank you

0 Kudos
2 Solutions

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

I am assuming your xy event theme is not a featureclass.

You could join the new data to the old data using the ID field and use the field calculator to copy over the x, y coordinates from the new data's fields to the old data's x, y fields, then.... add the table as an X Y event theme. If it works, then copy features to a new feature class since the shape field won't get updates in a featureclass


... sort of retired...

View solution in original post

Sean_Wray
Occasional Contributor

You could map the new data the same way you did the original data. Then since there is a common ID field, you could then join the original data to the new data, calculate your fields if necessary to make the new data match the original data, and then your point locations will be updated.

View solution in original post

5 Replies
DanPatterson
MVP Esteemed Contributor

Is the new data just the updated point locations and their data?

Has an id or some other key field been used in the spreadsheet that would facilitate joins? 


... sort of retired...
0 Kudos
MarcusNielsen
New Contributor II

Yes the new data is the just the updated coordinates.

They do have an ID field attached to them.

0 Kudos
DanPatterson
MVP Esteemed Contributor

I am assuming your xy event theme is not a featureclass.

You could join the new data to the old data using the ID field and use the field calculator to copy over the x, y coordinates from the new data's fields to the old data's x, y fields, then.... add the table as an X Y event theme. If it works, then copy features to a new feature class since the shape field won't get updates in a featureclass


... sort of retired...
Sean_Wray
Occasional Contributor

You could map the new data the same way you did the original data. Then since there is a common ID field, you could then join the original data to the new data, calculate your fields if necessary to make the new data match the original data, and then your point locations will be updated.

JonasDG
New Contributor

As said before join the new data to the old data using an ID field. Fields containing new x and y values is named x_new and y_new. Then With Calculate Field use a python expression...

Field Name (Existing or New):
SHAPE

Expression:
shiftCoordinates(!SHAPE!,!x_new!,!y_new!)

Code block:
def shiftCoordinates(shape,x_new,y_new):
    point = shape.getPart(0)
    point.X = x_new
    point.Y = y_new
    return point

Hit Run and the geometry is updated.

0 Kudos