# Creating arrows based on GPS velocities to show displacement

I am having trouble creating symbology in ArcGIS that can show velocity arrows of GPS stations. I have a point file with location information, velocity and direction of each GPS station. I want to create a map similar to the image I have attached. The size of the arrows stay the same but the length changes based on the velocity. See below.

My first instinct was to use graduated symbols however that just scales the arrows and does not stretch them.

I think your best bet is presenting data by lines.

• Create any size buffer around points
• Convert them to lines

Apply following field calculator expression (Python) on Shape field:

``````def plineM (B,V,SCALE,shp):
b=float(B);v=float(V)
part=shp.getPart(0)
buf=arcpy.Polygon(part)
pC=buf.centroid
X=pC.X+v*SCALE*math.cos(b/180*3.141593)
Y=pC.Y+v*SCALE*math.sin(b/180*3.141593)
newP=arcpy.Point(X,Y)
pLine=arcpy.Polyline(arcpy.Array([pC,newP]))
return pLine
``````

# ----------------------------

``````plineM( !BEARING!, !Velocity!,0.5, !Shape! )
``````

Making sure your bearings expressed in degrees, counter clockwise from East

INPUT POINTS TABLE:

OUTPUT:

You might want to play with scale factor. Note it is tested on shapefile, if it is not the case start editing session on lines before running expression.

• Great answer. Definitely lines are the way to go here. – Fezter Nov 18 '16 at 0:13
• With such things, client is rarely satisfied though, because some lines are "missing". To handle this I sometimes apply logarithmic scaling of V. – FelixIP Nov 18 '16 at 0:20
• This will work for small areas, but can't be scaled up indefinitely. If you run that script in a projected if your input bearing is pointing north, the resulting arrow will point "up" – AMurray Nov 22 '16 at 18:40
• Where do you think it should point? – FelixIP Nov 22 '16 at 18:46
• Sorry, I tried to edit comment but posted. Depending on the projection this could be problematic. If you're running this in a projected environment and the bearing is 90, then the arrow produced will be pointing straight up, which may or may not be north on that map/projection. If you get around this by doing running the script in a lat/long environment, then import the arrows to a projected map, the angles will be right but the lengths will be distorted. For mapping small areas the distortion might be negligible. For a continent it would be significant, depending on the projection. – AMurray Nov 22 '16 at 18:59

FelixIP has provided quite an elegant solution. A more simple alternative would be:

1. Set the Symbology for your point layer to "Graduated Symbols", with the Value set to your VELOCITY field.
2. Click the Template button to select a symbol which would be suitable for depicting bearings and velocities - I chose an arrow from the ESRI North font for the example.
3. Set the Symbol Size range to some values which will work for your map (you can refine these values later).
4. Click the Advanced button and select the "Rotation" option. In the Rotate window, select the Bearing field from the drop-down box, and choose the rotation style to suit your data.

(1)

(2)

(4)

(Example result)

• I should have pointed out that these symbols will be centred on where the point is located. This can be changed so that the starting point of the arrow is located at the GPS point by changing the Y offset of the pointer symbol in step 2 so that the base of the arrow is level with the X axis of the preview. If necessary, you could also add a point layer to the symbol to show the GPS point. – Adam Nov 23 '16 at 0:02
• Thanks for your suggestion. However I was looking for a solution where the length of arrow would change based on the velocity, not just scale the size of the arrow. – dmariamp Jan 17 '17 at 22:56