Dear Alex,
Thank very much. I solve it already. I am writing this script to rename it. Do you have alternative coding ?
#---- rename the maker corresponding to coordinate by sort algorithm
xy_coord = list()
for marker in chunk.markers:
x_tmp,y_tmp,z_tmp = chunk.crs.project(chunk.transform.matrix.mulp(marker.position))
xy_coord.append([x_tmp,y_tmp])
tmp_coord = sorted(xy_coord, key=lambda k: [k[0], k[1]]) # sort coordinate base on x axis first.
k = 0
for i in range(len(tmp_coord)):
k += 1
for marker in chunk.markers:
x,y,z = chunk.crs.project(chunk.transform.matrix.mulp(marker.position))
if x == tmp_coord[i][0] and y == tmp_coord[i][1]:
marker.label = "gcp" + str(k)
break