I have a lot of points. In the attribute table I have the coordinates(coordx / coordy).
How can I move all points, so that they are corresponding to the coordinates value in the attribute table?
You may do this within field calculator, see blog:
def XYsetVALUE( shape, X_value, Y_value): point = shape.getPart(0) point.X = X_value point.Y = Y_value return point __esri_field_calculator_splitter__ XYsetVALUE ( !SHAPE!, !X_COORD!, !Y_COORD! )
import arcpy feature_class=r'C:\TEST.gdb\points' #Change path and name to fc fieldlist=['X_field','Y_field'] #Change field names to match your data tokens=['SHAPE@X','SHAPE@Y'] with arcpy.da.UpdateCursor(feature_class,fieldlist+tokens) as cursor: for row in cursor: row=row row=row cursor.updateRow(row)