I know there would be no tool in arcpy module as such but mignt have in third party modules. I however tried taking the vertices of the polygon and moving using the below formula. but did not get the correct output coordinate values and polygon thus generated is wierd.
I have tried this function
def RotateAxis(AnchorX,AnchorY,inputx,inputy, WindDirection):
x = inputx - AnchorX
y = inputy - AnchorY
resultx = (x * math.cos(WindDirection)) - (y * math.sin(WindDirection)) + AnchorX
resulty = (x * math.sin(WindDirection)) + (y * math.cos(WindDirection)) + AnchorY
return (resultx,resulty)
where Anchor is the origin and WindDirection is the angle which I tried taking in radians as well as degrees but could ot get correct results.
I tried with projected coordinates that didn't work either. Is there any suggestion?
No comments:
Post a Comment