[GIS] Find network distance for multiple origins and destinations

arcgis-desktopdistance matrixnetwork-analystshortest path

I have a layer of points A (around 30), a layer of points B (around 2000), all recorded as in longitude and latitude. Need to calculate the distance between each pair (Ai, Bj) based on the transportation network. (only distance is needed, not direction, when I say distance I meant shortest distance, but we have a high tolerance to the accuracy, imagine as the result popped out from Google map direction)

I have tried everything, the closest thing I find here is the Network Analyst module in ArcGIS, but the result of Closest Facility (How to find network distances between two sets of origins and destinations?) is not what I wanted. I need a full matrix instead of just nearest facility.
Also I tried Google Distance Matrix API, that did work for me, but the usage limit is 2500 elements per day.

I meant to write a little python code looping the Routing/Direction function in ArcGIS, but i'm really new to python, if you can give me a brief idea how to implement this, that would be much much helpful.

Best Answer

Take a look at OD Cost Matrix within Network Analyst, sounds like it should work for what you describe you need.

Related Question