Many to Many Connect Origins to Destinations

1034
7
02-03-2023 06:03 AM
LuisGilling
New Contributor

Hello,

I'm fairly new to ArcGIS and am trying to use the Connect Origins to Destinations tool, but keep getting an error. I have two csv files with 20 records. Each file has three columns; name, address, and ID field. In one file (the origin), the ID field is unique. In the other file, the IDs are not unique as they are the destinations and correspond to one origin having multiple destinations. When I try to run the tool, I keep getting an error (attached) about the ID field in my Destinations file not being unique. I was under the impression if you are doing a many origins to many destinations that the non-unique ID was acceptable. Any help is appreciated!

0 Kudos
7 Replies
MelindaMorang
Esri Regular Contributor

The destination IDs need to be unique.  The field in Origins relating to the Destination ID field need not be unique because multiple origins can be assigned to the same destination.

The example under the "Using multiple origins and destinations" section in the tool documentation may be helpful in illustrating how it should work.

0 Kudos
LuisGilling
New Contributor

Thank you for the response! I tried referring to the tool example of the schools in the documentation as well. Switching it around just gave me the opposite error and now it complains about the field in the Origins layer not being unique. The OriginLink field is just a field that could contain any number between 1 and 4

Screenshot_20230207_123833.png

0 Kudos
MelindaMorang
Esri Regular Contributor

Hmm.

Okay, here's how I set up a test problem.

I have a layer with two stores, and they have a unique ID field called STORE_ID:

MelindaMorang_0-1675809540444.png

I have a layer with customers that has a non-unique field called STORE_ID that assigns each customer to a store.

MelindaMorang_1-1675809595843.png

Then I set up and run the tool:

MelindaMorang_2-1675809862681.png

It runs successfully and calculates a route between each customer and their assigned store.  (The example is made somewhat confusing by the fact that the ID fields have the same name, but they don't have to.)

So, the ID field in origins need not be unique, but the ID field in destinations does.

If you're still having trouble...I'm not too sure how to help you.  Might be best if you contact Esri Support, and they can look at your specific data and figure out what you're missing.

MelindaMorang
Esri Regular Contributor

Hello Luis and anyone else reading this thread who might be doing similar workflows.

(Luis, did you ever resolve your problem?)

Esri’s Network Analyst Team is doing some research about customer workflows involving solving routes or calculating travel times and distances between known or preassigned pairs of origins and destinations.  It sounds like that's what you're doing here!  We’d like to better understand our customers’ needs in this area and may use this information to design and develop improved tools and workflows.

If you have a few minutes and are willing, could you please fill out the attached survey and return it to the e-mail address included inside the document?  Alternatively, you can reach out to me (my e-mail address is in the document) to set up a meeting.

Thank you so much!!

Amanda__Huber
MVP Regular Contributor

Hello @MelindaMorang , 

We've run into a similar, if not the same issue. I've reached out to you via your email in the questionnaire but I will also post our issue here. 

We currently have a park entrance dataset that has approximately 90 points/locations. We would like to determine the distance from each "origin" to each "destination", multiple to multiple analysis type, all distances of all the possible permutations.

Currently in your documentation, it appears at 1:Many is supported, but would require a many man hours to run each iteration (1 entrance : 90 entrances). Alternatively the Many to Many requires the two fields to be matched by attributes, this is impossible in our case.

This seems like a fairly common analysis, but there doesn’t appear to be a current workflow for our needs.


Is there any solution for this or does this fit within your study?

 

Thanks,

Amanda Huber

 

0 Kudos
MelindaMorang
Esri Regular Contributor

Hi Amanda.

Your problem is actually an "all to all" situation since origins aren't explicitly assigned to particular destinations.  The Connect Origins To Destinations tool doesn't really support that mode very well.

Would the Find Nearest tool work for you? https://doc.arcgis.com/en/arcgis-online/analyze/find-nearest.htm  You just need to set the number of locations to find to something >= the number of points you have.  The tool limits this to 100, but if you have only 90, you should be good.

Amanda__Huber
MVP Regular Contributor

Hi Melinda, 

Apologies for the delay, this was just what we needed! Thanks for pointing us in the right direction. 

Best, 

Amanda

0 Kudos