Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.enter image description here

Thank you.

share|improve this question
1  
Your use of "vertically" looks ambiguous: is your fault slipping vertically (in the third dimension) or is it moving at right angles (in the plane) to the direction of the polyline? If it's the latter--as your examples suggest--then what direction should apply to a fault that "wiggles" and has no fixed direction? More realistically one would expect the motion (at least locally) to be a translation in some fixed (3D) direction by a fixed distance, both of which are given independently of the fault itself. –  whuber Mar 3 at 15:37
1  
You are right. I forgot to mention that I work at 2D and the fault in this example slips from southeast to northwest so I want the relocation to be right of it. –  user27581 Mar 3 at 16:53
    
With trial and error I have come to the conclusion that if I use the equation math.sin(45)*value + x and math.cos(45)*value + y respectively I have the vertical relocation I want but for this fault that has this specific angle. I tried with some more linear shape-files but I couldn't find in what way arc-map calculates the angles. –  user27581 Mar 3 at 19:26
    
@user27581 It sounds like you may have answered your own question, in which case do not be afraid to add it as an Answer, that you are then able to Accept after a time interval (of a day or two, I think) has elapsed. –  PolyGeo Mar 4 at 1:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.