Display Results of OD Cost Matrix csv file

534
1
12-16-2022 10:43 AM
BenKlar
New Contributor

I am trying to calculate the mean travel time from a set of origins to a set of destinations over a time window and display the results. This is very similar to creating an isochrone map for several destinations, however I would like to be able to show the average travel time for each minute over a window of time.

This is the workflow I am using at the moment:

  • Create a grid of cells covering the study area (using 'Generate Tessellation') to be used as the origin input
  • Create a feature class containing points representing a series of destinations that I want to calculate the time to reach, to be used as the destination input
  • Run the 'Calculate Travel Time Statistics (OD Cost Matrix)' tool using the grid of cells as the origins and the feature class of destination points at the destinations - this outputs a .csv file containing the mean cost matrix
  • Due to the limitation of creating a one-to-many join using the Add Join tool, I am not able to join my origins grid with this OD Matrix table (since you can only do a many-to-one join, all the destination rows in the table will not be captured). My workaround is converting the OD Matrix .csv file into a Geodatabase Table using 'Table to Table', and then using 'Make Query Table' with the origins file and the new OD matrix file as inputs, and making the where so that only rows with matching Origin OID are included.

This works fine, but it is not exactly pretty or easy to replicate multiple times. I tried to create a model with ModelBuilder to create a tool to do perform this workflow, however I run into challenges using the .csv file from the OD Cost Matrix tool as input to the 'Table to Table' tool in ModelBuilder.

Is there any simpler workflow that I can use to perform this task, or any other workaround to be able to perform a one-to-many join between the origins and the OD Matrix table with multiple destinations?

Tags (1)
0 Kudos
1 Reply
MelindaMorang
Esri Regular Contributor

Hello.  I'd like to help you with this, but there's a lot going on here, so I want to make sure I understand what the problems are that you're experiencing.

What do you want your final output to include?  If I understand that better, I might be able to come up with a better workflow.

Regarding the limitations of the Add Join tool: I believe the limitations you're referring to is this (from the documentation) : "The input table must have an Object ID field to perform a one-to-many join and be in the same workspace."  Is that correct?  Did your workflow work correctly after you ran Table To Table and you made sure to put it in the same geodatabase as your input origins?

What "challenges" are you experiencing in Model Builder?

Are you able to write Python code?  Joins in the pandas package are quite easy to do and very fast, so this would be an option if you're able to write Python.

0 Kudos