It's not bad
import arcpy
from math import pi, sin, cos
def DtoR(deg):
rad = deg*(pi/180.0)
return rad
def MovePolygon(shape, angle, distance):
newshape = arcpy.Array()
for part in shape:
newpart = arcpy.Array()
for point in part:
newX = point.X + cos(DtoR(float(angle)))*float(distance)
newY = point.Y + sin(DtoR(float(angle)))*float(distance)
newpoint = arcpy.Point(newX, newY, point.Z, point.M, point.ID)
newpart.add(newpoint)
newshape.add(newpart)
return arcpy.Polygon(newshape)
fc = r"--system path to FC--" # E.g. C:\MyGDB.gdb\MyFC
angle = 45 # Angle in degrees
distance = 1000 # Distance in native spatial reference units
# You can find it by: arcpy.Describe(fc).spatialReference.linearUnitName
with arcpy.da.UpdateCursor(fc, "SHAPE@") as cursor:
for row in cursor:
cursor.updateRow((MovePolygon(row[0], angle, distance),))
Edit: Make sure you're in a projected coordinate system. Also, doesn't work when you have true curves (circular arcs, ellipses, Bezier curves) in the polygon.