Function Repository Resource:

# CompassPoint

Returns a string with the closest (inter)cardinal direction

Contributed by: Sander Huisman
 ResourceFunction["CompassPoint"][b] returns a string for the bearing b from an 8-wind compass rose. ResourceFunction["CompassPoint"][b,n] returns a string for the bearing b from an n-wind compass rose, where n= 4, 8, 16 or 32.

## Details

Bearings go from 0° being North and goes clockwise such that 90° corresponds to East, 180° to South and 270° to West.
b can be specified in the form Quantity[b,"Degrees"].

## Examples

### Basic Examples (1)

Create a string representation of an 51° bearing on an 8 point wind rose:

 In[1]:=
 Out[1]=

### Scope (3)

Use a 32-point wind rose:

 In[2]:=
 Out[2]=

 In[3]:=
 Out[3]=

Negative angles are allowed and equivalent to their positive angle by adding 360°:

 In[4]:=
 Out[4]=

### Possible Issues (1)

Each sector has two borders, the border in the clockwise direction belong to the sector, the other border to the previous section:

 In[5]:=
 Out[5]=

### Neat Examples (1)

Make a compass:

 In[6]:=
 Out[6]=

SHuisman

## Version History

• 1.0.1 – 26 April 2021