I have a large data set of federal contracts which includes two pieces of spatial data per entry (or line): the zip code in which the project took place and the address of the contractor. I am interested in automating the calculation of distance between these two points for each contract and storing it in a new field in the attribute table so that I can run some simple and complex statistical analyses.

To further complicate the matter, I need to calculate distance in road miles and travel time (which i have done in other projects using arcgis online analysis tools). I have never figured out how to do it in ArcMap.

  • The centroid of a ZIP code may not fall on a road, could be in the middle of nowhere. I don't see how you can get road miles in situations like that. – Maksim Oct 2 '15 at 18:02
  • 1
    One way would be to reverse-geocode the ZIP centroids for the project and the contractor (ArcMap will do this) to a pair of street addresses, then find driving distance/time between those addresses. It will be a pretty coarse approximation, especially when the two ZIPs are nearby. – dbaston Oct 2 '15 at 18:26
  • 1
    @dbaston good idea, I hadn't considered reverse geocoding the zip code centroid. Do you have suggestions for how to then calculate the distance between the two when they are stored in the same attribute table? – Chelsea Pennick McIver Oct 2 '15 at 19:27
  • I think your question will become more answerable if you can describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Without a question mark in your question body it sounds like you want help but are not asking anything specific. – PolyGeo Sep 10 '16 at 5:11