Allow updating geometry in Field Calculator

428
1
07-27-2016 09:39 AM
Status: Open
GreggRoemhildt1
Occasional Contributor

Lets say I have two feature class,

- Points A. All the points have a unique point_id.

- Points B, these points have an ID that matches the point_id in the Points A class.

I can join these two tables using the point_id.

Now I would like to update the geometry of the points A feature class with the geometry with points B. This would be trivial in an SQL server...It would be very useful in ArcGIS file geodatabases.

    UPDATE Point_A a
    INNER JOIN Point_B
    ON a.point_id=b.point_id
    SET A.geom=B.geom;

Perhaps this could apply to any type of geometry also.

1 Comment
AnthonyClark3

This be done using Python. You can do an arcpy.da.UpdateCursor (point a) and store the point_id as a variable. Then nest an arcpy.da.SearchCursor on the second feature class (point b), with an if statement.

If point_id1 == point_id2:

    geometery1 = geometry2

Here's the link to UpdateCursor. And note, "Geometry properties can be accessed by specifying the token SHAPE@ in the list of fields."

UpdateCursor—Help | ArcGIS for Desktop