AnsweredAssumed Answered

Can't change points from attribute

Question asked by joanna.grossman on Nov 17, 2016
Latest reply on Nov 17, 2016 by joanna.grossman

HI all - Currently I'm getting:

Runtime error
Traceback (most recent call last):
  File "<string>", line 14, in <module>
AttributeError: 'module' object has no attribute 'updateCursor'

from the following code:

# Move points based up current lat/lon
#grab stuff you need
import arcpy, os

 

#filepath
filepath = r"C:\Users\joanna.grossman\AppData\Roaming\ESRI\Desktop10.4\ArcCatalog\AGR_SecureProd__AGR_Admin.sde"

 

#get feature class, feidds
fc = "GDB_AGR_SECURE.AGR_ADMIN.ApiariesWGS_20160927"
lat = "Latitude"
lon = "Longtitude"

 

#create curser on fc
cursor = arcpy.da.updateCursor(fc, ["SHAPE@XY"])
row = cursor.next()

 

#get points
pnt = arcpy.Point()

 

while row:
    x = row.getValue(lon)
    y = row.getValue(lat)
    xy = (x,y)
    #pnt = arcpy.Point(xy)
    #pnt_geometry = arcpy.PointGeometry(pnt)
    print x
    print xy
    #print(pnt_geometry.getGeohash(6))
    #row.shape = pnt  
    cursor.updateRow([xy])
    row = cursor.next()

I'm a total Python/arcpy noob. Would really appreciate your feedback.

Outcomes