i like to create a standalone Python script that reads points(X,Y) from a fc, moves them in a user-defined distance and saves them in a new fc. I tried to do the steps with the data access module, but i dont know so far how to go on, especially with the part "moving the XY-points" . Any help is apreciated!
import arcpy arcpy.env.overwriteOutput= 1 arcpy.env.workspace = "workspace" outputFC = "New" inFC = "inFC"
arcpy.CreateFeatureclass_management("workspace","New","POINT") cur = arcpy.da.InsertCursor("New", "SHAPE@XY")
point=arcpy.Point() cur2 =arcpy.da.SearchCursor("inFC",["SHAPE@XY"]) for row in cur2: >print row outputFC=row.GetValue("Shape") point=outputFC.getPart() point.Y = pnt.Y point.X = pnt.X
array.add(point)
feat.shape=array del row del cur del ins
import arcpy
arcpy.env.overwriteOutput= 1
arcpy.env.workspace = "workspace"
outputFC = "New"
inFC = "inFC"
arcpy.CreateFeatureclass_management("workspace","New","POINT")
cur = arcpy.da.InsertCursor("New", "SHAPE@XY")
point=arcpy.Point()
cur2 =arcpy.da.SearchCursor("inFC",["SHAPE@XY"])
for row in cur2:
print row
outputFC=row.GetValue("Shape")
point=outputFC.getPart()
point.Y = pnt.Y
point.X = pnt.X
array.add(point)
feat.shape=array
del row
del cur
del ins