Distances between two point shapefiles

4447
11
Jump to solution
10-11-2012 01:02 PM
michaelcollins1
Occasional Contributor III
I have 2 point shapefiles, say Monitor and Source, and I need the distances from each point in Monitor to each point in Source. I'm banging my head a little to find a tool for this, any suggestions? I have 10.1 ArcView and Spatial Analyst.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Zeke
by
Regular Contributor III
Here's the tool I was thinking of. States it's for 9.2, but I've used it in 10.0. Not sure if it works in one layer or only two. You could always add the point layer twice. It creates lines from every point  to every other point.

View solution in original post

0 Kudos
11 Replies
T__WayneWhitley
Frequent Contributor
To be clear about what you are saying, you said distance to each point or are the points to be 'paired' somehow as in, say, nearest point?

One way is to limit your results by using a 'search proximity' parameter (in other words, a search radius) and use the Point Distance tool in the Analysis toolbox...   that's Analysis >> Proximity >> Point Distance


Looks like Generate Near Table generates similar results with more optional details (same toolbox).
0 Kudos
michaelcollins1
Occasional Contributor III
Thanks for the reply.

I need the distance from every point in Monitor to every point in Source.
The Analysis tool isn't available to me unfortunatly.

I'll probably have to rig something up in Excel.
0 Kudos
Zeke
by
Regular Contributor III
I think I saw this done in one of ESRI's GIS Tutorial books, but it might have been a third party tool. I'll look when I get home. Want to say it was called a spider something tool, but not sure.
0 Kudos
T__WayneWhitley
Frequent Contributor
Should still be able to use one of those proximity tools in ArcToolbox, provided they aren't overloaded...
At any rate, you could also set up a Python script yourself, say 2 search cursors on the Source and Near point fcs and an insert cursor on an output table.
For example, nest one search cursor inside the other search cursor so that for every Source (the outer loop) you're computing the distance to every Near (the inner loop) and insert the result into your output table.  Could even segregate into separate tables (possibly relate them) to keep from building a single enormous table -- all depends on your situation and desired result.  Hope that helps.
0 Kudos
T__WayneWhitley
Frequent Contributor
hmmmm, I haven't thought of that, Greg - sounds like the results are mapped as well.
I haven't tried it but looks like 'cycling' would be the looping on every point...here it is if you want to try it:

http://resources.arcgis.com/gallery/file/Geoprocessing-Model-and-Script-Tool-Gallery/details?entryID...

I'd be interested to know how well it works for you.  If that works, good call, Greg!
0 Kudos
MichaelStead
Occasional Contributor III
There are 2 Spider Diagram functions in ET GeoWizards, but I think they are limited functionality in demo (http://www.ian-ko.com/). You could create something in model builder that itterates through each source point, builds a raster of the same extent as your points and then use the Eulcidean Distance tool in a script to create a distance grid and then uses the Extract Values to Points tool to add distance to each destination point (in the attribute table) to that source point. By naming your Euclidean raster outputs after the source point you should be able to get meaningful field names. Repeat until out of source points. Might end up with a very wide table.
0 Kudos
michaelcollins1
Occasional Contributor III
Thanks for the replies.

Due to time constraints I wound up using Excel (the distances were short so Pythagoras was fine). I do have ET Geowizards but the 2 spider diagram tools don't really do what I need.

I'm sure it will come up again though so I'll probably have to use Python. I won't be able to use anything from the Analysys tool set as I don't have access to that with by current ArcGIS license. I'll have to dust off a text book or two though.

Thanks again
0 Kudos
Zeke
by
Regular Contributor III
Here's the tool I was thinking of. States it's for 9.2, but I've used it in 10.0. Not sure if it works in one layer or only two. You could always add the point layer twice. It creates lines from every point  to every other point.
0 Kudos
michaelcollins1
Occasional Contributor III
Here's the tool I was thinking of. States it's for 9.2, but I've used it in 10.0. Not sure if it works in one layer or only two. You could always add the point layer twice. It creates lines from every point  to every other point.


Ok, this one works  (on 10.1 anyway) without having to play around with the script.

thanks
0 Kudos