Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create an OD cost matrix python script.

I'm doing an OD cost matrix analysis. I'll find out the average time with patients to hospitals over 10 years. When I do this analysis, the result is that each patient visit every hospital, but in reality a patient only visit one hospitals. In my orgins table I have an attribute value HOSPITALS with the names of hospitals that can be linked to attribute value HOSPITALS in my destinations table. This means that the analysis should understand that each patient only visit a hospital.

Does anyone have a tip on how I do this in arcpy?

share|improve this question

closed as unclear what you're asking by Devdatta Tengshe, PolyGeo, Fezter, Curlew, Paul Oct 24 '13 at 17:52

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Are you using ArcGIS for Desktop 10.1 with Network Analyst extension? – PolyGeo May 23 '13 at 19:19
I have ArcGIS Desktop 10.0 and 10.1 With Network Analyst extension and PythonWin. – user15888 May 23 '13 at 19:30
Perhaps list out the manual steps (precise tool and parameters) and then we can help you with the Python/ArcPy code to automate that workflow. – PolyGeo Oct 24 '13 at 11:32

I got the Same Problem and was found out through one day. In my case, It can be traced to the “Network dataset”.

After import the feature class (whether the single or multiple), then do the “Network dataset”.

In this progress, they need to set up “specify the attributes for the network dataset”.

There is a “Evaluators” button. Click it.

In the “Source Values” tag, you should set the “Field” in Type Column and choose the value you want network calculate.

That’s it

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.