Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find the average distance from several points in a layer to points in another layer. I am using ArcMap Basic - I know there is a way to do this using the Advanced version of ArcMap but was wondering if anyone knew a workaround for Basic (if it exists).

Any insight would be appreciated.


share|improve this question
Are you trying to find an ArcGIS for Desktop Basic workaround to Near or to Point Distance? – PolyGeo Mar 15 '13 at 23:31

I think the ArcPy answer will be to SearchCursor through your two feature classes and use an InsertCursor to write a new table with values calculated according to this algorithm:

import math
dist = math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))

which is the Python equivalent of AML's INVDISTANCE function.

This approach would give you the distance from every point in one feature class to every point in another. If you are only interested in those up to a certain distance just write records when the distance returned is greater than this threshold.

share|improve this answer

If you are only looking to find the 1st nearest point, the easiest method would be to use Spatial Join with the match_option set as CLOSEST. This will return the attributes of the join_features point closest to each target_features point.

If you need to find many nearest points (e.g. the 1st through 10th nearest points) to each point and you have lots of points (n > 100,000), it will be much faster to create a Python script that uses the cKDTree module from SciPy.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.