Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

Thanks.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.