AHOPPERS

Select by Location -Within a Distance - Incorrect Results

Discussion created by AHOPPERS on Jul 18, 2014
Latest reply on Aug 8, 2014 by AHOPPERS

This is a significant bug. In ArcMap 10.1, if you choose the "are within a distance of the source feature layer" option when using the Select by Location tool, you will get different and potentially incorrect results depending on the coordinate system of your data frame. If you run the tool in python, you will get incorrect results if your feature layer is saved in geographic coordinates.

 

The most dramatic error I encountered occurs when the data frame coordinate system is in the infamous "WGS 1984 Web Mercator (auxiliary sphere)", the default for tiled web map services like Bing Maps.  I entered a 3 km radius selection and the resulting selection set included only features that were less than 2 km away from the source feature.

 

If you switch to pure geographic coordinate system for the data, the selection set gets larger but it is still incorrect. In this case, the tool seems to forget that longitude lines converge as you approach the poles, so the radius is 3 km south-to-north but less than 2 km west-to-east.

 

If your source data happens to be in geographic coordinates, you will find this same error occurs if your run the tool in python. This is even more concerning because it may mean script tools can't measure distances properly for data in geographic coordinates, although I haven't taken the time to research that possibility.

 

Switch to a conformal (UTM) or equal-area (Albers) projection appropriate for your area of interest, and the tool seems to provide correct results. I confirmed this by using the tried-and-true create a buffer and intersect approach. I double-checked it with the haversine formula for great circle distance calculations outside of ArcGIS.

 

Recommendation: Do not use the Select by Location tool's "are within a distance of the source feature layer" option in a map document or in python script until this bug is resolved.

Outcomes