AnsweredAssumed Answered

Shifting X coordinates using SHAPE@X

Question asked by tonalca6864 on Jul 4, 2018
Latest reply on Jul 11, 2018 by tonalca6864

Hi,

I need to shift by 360° points that are offset. It is just 7 columns of points in the West on the X axis that need to be shifted (see pictures  and script below).  I'm getting this error: TypeError: 'float' object has no attribute '__getitem__'

Also, I'm not sure if I'm selecting/identifying the 7 columns of points I want correctly on my script.

 

Any help will be much appreciated.

import arcpy
import string
import math


FC = r"H:\NETcdf_TEST\TEST.gdb\rast2point"

x_shift = float(360)

with arcpy.da.UpdateCursor(FC, ['SHAPE@X']) as cursor:

    for row in cursor:

        cursor.updateRow([[row[0][7] + x_shift]])

    del cursor

Outcomes