Hi, I was investigating on my own, but I did not get a solution. I need to move points in a massive way to specific coordinates, I found a phyton code that makes it perfect in ArcMap, but the problem is that the points are a feature service, and in ArcMap it is not so easy to edit, and the service is very heavy for a local copy, then, I thought I would do it directly in ArcGis Pro, but I get the following error:some idea of how to do this process in ArcGis Pro?
Thanks!
Solved! Go to Solution.
I just tried this and it worked:
The reason might be the fact that you are returning a point object when the geometry is a PointGeometry object.
Code Block:
def Move2NewLoc(pntg, x, y):
pntg_new = arcpy.PointGeometry(arcpy.Point(x, y), pntg.spatialReference)
return pntg_new
did you validate the expression?
I just tried this and it worked:
The reason might be the fact that you are returning a point object when the geometry is a PointGeometry object.
Code Block:
def Move2NewLoc(pntg, x, y):
pntg_new = arcpy.PointGeometry(arcpy.Point(x, y), pntg.spatialReference)
return pntg_new
It works perfect,
thank you so much, you have save my life !
You're welcome. Glad it worked. Please mark the post as the correct answer for others to find this answer easier.