HOW TO

Calculate the intercardinal direction from one point to a set of points in ArcGIS Pro

Last Published: September 6, 2023

Summary

In a situation where a set of points surround a main point, the intercardinal direction of the main point may need to be identified for analysis, such as determining the quadrant in which a point or a group of points lies with respect to a central point.

This article describes the workflow to calculate the intercardinal direction from one point to a set of points in ArcGIS Pro.

Procedure

Note: 
This workflow involves the use of the Generate Near Table tool which requires an Advanced license.
  1. Open the point layers in ArcGIS Pro.
  2. Calculate the proximity information of the point layers using the Generate Near Table tool.
    1. On the Analysis tab, click Tools to open the Geoprocessing pane.
    2. In the Geoprocessing pane, search for and click the Generate Near Table tool.
    3. In the Generate Near Table pane, on the Parameters tab, use the Input Features drop-down list to select the point feature. In this example, 'Point1' is selected.
    4. Under Near Features, select the points that surround the input point feature. In this example, 'Point2' is selected.
    5. Specify a name for Output Table. In this example, it is named, 'Point2_GenerateNearTable'.
    6. Set the desired Search Radius. In this example, 50 kilometers is specified.
    7. Check the Location and Angle check boxes.
    8. Uncheck the Find only closest feature check box.
    9. Under Method, select Planar.
    10. Click Run. An output table is generated.
The Generate Near Table tool
  1. Right-click the table in the Contents pane, and click Open.
  2. Add a new text field to the table. Refer to ArcGIS Pro: Add Field (Data Management) for more information. In this example, the text field is named, 'Direction'.
  3. Use the Calculate Field tool to create a Python function to convert the angle values to text direction.
    1. For Input Table, select the table created in Step 2.
    2. Under Field Name, select the new text field. In this example, 'Direction'.
    3. For Expression Type, select Arcade.
    4. Enter the following script in the Code Block.
if ($feature.NEAR_ANGLE >= 0 && $feature.NEAR_ANGLE < 90){
    return "NE"}
else if ($feature.NEAR_ANGLE >= 90){
    return "NW"}
else if ($feature.NEAR_ANGLE >= -90){
    return "SE"}
else if ($feature.NEAR_ANGLE <= -90){
    return "SW"}
else{
    return "invalid"}
  1. Click OK.

The intercardinal direction from one point to a set of points is generated as shown in the image below.

The intercardinal line direction is generated

Article ID: 000031064

Software:
  • ArcGIS Pro 3 1
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 9x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options