In the last few months I am experimenting with ArcGIS in order to create a synthesis of tools in model builder for my postgraduate thesis. The problem I am facing for a long time now is the following:
I have one (or more it doesn't matter) linear objects (that represent faults) and with the help of "create routes" and "make route event layer" tools I place points on it (representing epicenters of an earthquake). I want to achieve a relocation (or offsetting) of all these points vertically to the trend-line of the linear feature I create with the "smooth line" tool. The only thing I have managed till now is a relocation by changing a small script I found in this site.
def Shift_XY_Coordinates(shape, x, y): value = distance point = shape.getPart(0) point.X = x + value point.Y = y + value return point
with the expression
Shift_XY_Coordinates(!shape!, !POINT_X!, !POINT_Y!)
I want to offset the points by 10 km. How am I supposed to add the correct distance every time when the angle of the linear feature class may be different every time? At the example I am using the trend line has an angle of 45 degrees so I tried with the Pythagorean Theorem and found out that I need to add approximately 7000 meters.
I don't know If I was clear enough in what my problem is but I'd greatly appreciated if anyone could suggest me a solution or at least guide me at this. I also attach a picture of what I want to achieve. The starting location of the epicenters is the red line.