# Making radial flow map showing curved lines over short distances (20km) using ArcGIS for Desktop?

Esri have provided instructions on how to make a radial flow map but I think the curved lines will only be produced over a long distance, like half the globe.

For short distances (20km) a geodetic line will probably still look pretty straight. To keep using this process for a radial flow map over short distances, then, I thought we could edit the datum settings so the earth is smaller, hence you'll get a nice curved line for a small distance. Anyone know how to do this?

Alternatively, is there another tool in ArcGIS Desktop 10.0 to use for making curved lines? I have 90 points that I need to connect up to 54 points, would be good to automate it rather than having to draw the lines manually.

• Your question was asked at gis.stackexchange.com/questions/5204/… in a non-ArcGIS context. You may find the answers to be of interest. – whuber Jul 1 '12 at 17:35
• I had a different idea to whuber's, but his may be better given your goals. I simply thought one could add an arbitrary amount of bend into the arc's, similar to what is done in arc diagrams. One could then change the direction of the apex depending on the flow direction. Essentially the workflow would be the same to great circles, break the line string up into many smaller straight segments. The arbitrary bend though could accommodate any local projection. – Andy W Jul 2 '12 at 2:33
• @AndyW, your suggestion sounds more useful to me (although no offense to whuber, who makes great suggestions for more capaple users). I am not able to understand or implement whuber's suggestion. I am after a simple 'out of the box' solution, preferably an ArcGIS extension. I looked at arc diagrams, there are some amazing examples there. I am not seeing a solution there for a simple static map showing a many to many (but usually one to many) relationship between, in my case, eviction sites and relocation sites. – ndthl Jul 4 '12 at 9:55

Here is an illustration of the workflow I mentioned in the comment above, and although I don't know of any simple pre-canned routine to do this, I have attached an excel spreadsheet that one can import a set of origin-destination coordinates and the sheet then makes a set or circular line coordinates (spreadsheet here). It has formulas set up so it is pretty easy to import new OD coordinates and extend the formulas to fill in the results, but I will go through the logic of the process more explicitly though, and others can give advice how to script it entirely within ArcMap (or whatever).

Briefly, I think this is reasonable for visualizing OD data mainly for the same reason great circle lines are popular, they provide more visual distinction between lines. The approach I suggest also has one advantage over great circle lines, in that the direction of the flow is encoded in the half-circle. In this other answer on the site I give a more general over-view of visualization techniques for flow mapping, and many of those same techniques can be applied in addition to making arcs like this.

So, to detail how one draws lines like I am suggestion, essentially I only have 3 steps for the process, 1) find the orientation of the flow, 2) find the mid-point and the distance of the flow, 3) treat the mid-point as the center of a circle, and then draw the arc (a half-circle from the origin to the destination). To be clear, I am starting with a set pair of projected origin coordinates `(x1,y1)` and destination coordinates `(x2,y2)`.

So 1) find the orientation of the flow. One first uses the formula `ATAN((y2 - y1)/(x2 - x1))` and then depending on the direction assigns an orientation depending on whether the direction is eastward or westward. An example pseudocode below (I assign OD points that are both at the same coordinates an orientation of zero). Here the varaible `or_rad` is meant to be shorthand for "orientation in radians" and `pi` refers to the value of pi.

``````#tan_or = ATAN((y2 - y1)/(x2 - x1)).
Do If x2 = x1 and y1 <= y2.
Else if x2 = x1 and y1 > y2.
Else if x1 > x2.
compute or_rad = 270/180*pi - #tan_or.
Else if x1 < x2.
compute or_rad = 90/180*pi - #tan_or.
End If.
``````

2) Find the mid-point and the distance of the flow. This is very simple, for just one set of paired coordinates the mid-point in (x,y) coordinates will be `(x1+x2/2,y1+y2/2)`. So lets define `mid_x = (x1 + x2)/2` and `mid_y = (y1 + y2)/2` for the next part. The distance using the pythagoreum theorum is simply `distance = SQRT((x1 - x2)^2 + (y1 - y2)^2)`.

3) Then given that information, draw the circle given over a pre-specified number of degrees and a radius (which is half the distance between the two points). For instance, lets say we start out with a set of OD coordinate pairs at `(1,3):(3,2)`. The orientation in degrees will be ~ 116 (and in radians ~2), the x,y mid-point will be `(2,2.5)` and the distance between the two points is about 2.2.

So lets say we want to draw the half-circle around 180 degrees. In pseduo-code (using the variables I already defined) the iterations will look something like;

``````for i in (0 to 180 degrees)
step_or = pi - rad_i /*for clarity, this makes the circle go from origin to destination  