move a point using field calculator (hosted feature layer)

473
0
10-10-2019 09:25 PM
PeterMacKenzie2
Occasional Contributor II

I  use ArcGIS Pro field calculator to move points stored as a hosted feature layer using a field calculator on the Shape field using this Python3 expression (below). It takes ages to run, over 12 mins for 21 points. I need to move batches of a few hundred at a time. Are there any other ideas on how I could do this process? I have attachments on the points so downloading locally and re-uploading wouldn't really be practical either. Enable Undo is off

Shape= update()

def update():
fc = "the_f_points   "
pnt = arcpy.Point()
rows = arcpy.UpdateCursor(fc)
for row in rows:
pnt.X = row.survey_x_local
pnt.Y = row.survey_y_local
row.shape = pnt
rows.updateRow(row)
del row, rows

0 Kudos
0 Replies