Frequently asked question

Changes in distance calculation for Nearest Neighbors in GeoAnalytics Engine

Last Published: August 10, 2023

Answer

After upgrading to GeoAnalytics Engine 1.2, you may see a difference in the value for the “near distance” result field when using the Nearest Neighbors tool. If this is encountered, it is likely due to a change in the default distance unit used in reporting near distance in the GeoAnalytics Engine 1.2 release.

In the GeoAnalytics Engine 1.2 release, the Nearest Neighbors tool added support for geodesic distance calculations. Now both planar and geodesic distance calculations are supported when searching for nearest neighbors. With this change, we corrected the default unit for distances returned in the “near_distance” result to a consistent default unit of Meters. Previously when performing calculations using datasets in projected coordinate systems the distance returned was in the unit of the projected coordinate system of the query input. For example, if the coordinate system was Washington State Plane North NAD83 in US Survey Feet, the resulting distance unit would be in feet in GeoAnalytics Engine 1.1 and earlier.

Starting in GeoAnalytics Engine 1.2, the distance calculation returned, irrespective of spatial reference defined for the input data, is in meters by default. If no spatial reference is defined for the inputs to Nearest Neighbors, the unit for the near distance will be undefined.

To confirm the units returned by the Nearest Neighbors tool in earlier versions of GeoAnalytics Engine, you can use the ST_SRText function to view the spatial reference of a column in Well-Known Text (WKT) format. This WKT string should include details for the units of measure in the coordinate system.

In GeoAnalytics Engine 1.2, if you would like the distance result to use a different unit, the setOutputUnit(distance_unit) setter can be used to change the unit to kilometers, feet, miles, nautical miles, or yards. More details on this can be found in the Nearest Neighbors tool documentation.

Article ID:000031042

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