Select to view content in your preferred language

Computing distances

3459
8
01-02-2017 12:21 PM
AndrewNarwold
Deactivated User

I have several thousand real estate transactions for which I have both the buyer's and seller's zip code of origin.  I am trying to get ArcGIS to compute the distance between these zip codes for each observation.  I am not an expert in GIS by any means, and need some help figuring out how to do this.  Thanks.

0 Kudos
8 Replies
DanPatterson_Retired
MVP Emeritus

You will need a file of the zip code centroid geometry or you will have to geocode your own data

Commonly used address locator styles—Help | ArcGIS Desktop 

Then you will have to decide if the straight-line distance will suffice or you need a more detailed road distance which would require more time effort and expenditure.

How is your data arranged currently?  is the owner - buyer information already paired in a data set?

0 Kudos
AndrewNarwold
Deactivated User

Thanks for the quick reply. Yes, the data is paired. So what I have done

is gotten the centroid of both the zip codes in terms of decimal degrees

latitude and longitude. Then used an Excel function to convert the

difference between these two locations. Not the most elegant of solutions,

but it seemed to work.

Andrew Narwold

Professor of Economics

School of Business, University of San Diego

5998 Alcala Park

San Diego, CA 92110

619-260-4875

0 Kudos
DanPatterson_Retired
MVP Emeritus

If you are using a great circle calculator then you should be fine.  You could compare closely paired values with calculated using measure tools in Google Earth.  Alternately, you could add your excel file to arcmap, using the longitude/latitude coordinates from the seller data as one file,  then the same data for the buyer as another file.  You would then have a visual to check either manually.  You could then set an appropriate projection for your area(s) to calculate planar distances.  But in short... I suspect your approach is the quickest.

0 Kudos
BruceHarold
Esri Regular Contributor

Dan, take on the challenge of implementing Vincenty inverse distance calculation in Excel, it's 2017!

0 Kudos
DanPatterson_Retired
MVP Emeritus

grief ... got that stuff somewhere in python... now I will have to look for it

0 Kudos
BruceHarold
Esri Regular Contributor
0 Kudos
DanPatterson_Retired
MVP Emeritus

Welll I found it... then I had to clean it up... numpy_samples/vincenty.py at master · Dan-Patterson/numpy_samples · GitHub 

0 Kudos
BruceHarold
Esri Regular Contributor

Wow!  As an aside I'm amazed at the distortion you can get on distances in projections that are not meticulously crafted for the job.  This is on the ellipsoid.

0 Kudos