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.
Answer
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.
UPDATE: January 2020
A couple of people reported ERROR 000539 when using suggested expression. Vey likely reason is large buffer around original point, resulting in buffer overlaps. If you are using build-in ArcGIS tool to convert buffers to lines it might result in lines made of 2 vertices:
Possible workaround is making smaller buffers.
No comments:
Post a Comment