Is This Content Helpful?
We're glad to know this article was helpful.
The instructions provided describe a workflow that is intended for situations where a set of points surrounds a main point and the intercardinal (ordinal) direction (NW, NE, SW, SE) must be added as a field to the table.
This is useful when determining the quadrant in which a point, or group of points, lies with respect to a central point.
This workflow requires the use of the Generate Near Table tool and Python code in the Field Calculator. This workflow assumes there are two separate point feature classes.
Note: The Generate Near Table tool requires an Advanced license.
Note: This workflow is intended for use with the Planar option. The Geodesic method produces different results that might not be compatible with this workflow. The Generate Near Table and Near tools were completely rewritten at ArcGIS version 10.2.1 to be dramatically faster and have an optional Method parameter that determines how distances are computed. When Method is set to GEODESIC, distances are calculated across the Earth's surface. This is most accurate when the distance between features is large and you want to minimize the distortion inherent in all projected coordinate systems, particularly in projections like Web Mercator. When set to PLANAR, Euclidean distances are calculated using the coordinates of the features and is appropriate for projections that minimize distance distortion or when the distance between features is small. Please see What's new in ArcGIS 10.2.1 for more information.
def Direction(angle): if (angle >= 0 and angle <= 90): return "NE" if (angle >= 90): return "NW" if (angle >= -90): return "SE" if (angle <= -90): return "SW"