Calculate distance to membership clubs

2835
5
12-20-2015 03:33 AM
BjornSchadenberg
New Contributor

Hi,

I've got from a number of tennis players their addresses and of which tennis clubs they are member of. I've got all addresses from the tennis clubs.

First, I want to know the distance for each tennis player to their nearest tennis club (whether they are a member of it doesn't matter). This is straightforward with the closest facility option, so no problem here.

Second, I want to know for each tennis player the distance to each tennis club he/she is a member off (a player can be a member of multiple clubs). How can I do this second step, without splitting up my file into multiple files based on tennis club membership.

In the attribute table I've got unique player numbers, followed by their location information. Then there are seven columns (club1, club2...club7), where for each player the club number(s) are registered. A player that is member of only one club only has a value under 'club1'. The club numbers corresponds to the other file with all the tennis clubs and their location information.

In the end, I wish to have one table with all tennis players followed by 8 collumns, one for the distance to the nearest tennis club, and seven (or less) for the distances to the tennis clubs the player is member of.

Thank you in advance.

0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

Is it like an origin-destination kind of result? Make OD Cost Matrix Layer—ArcGIS Pro | ArcGIS for Desktop

0 Kudos
BjornSchadenberg
New Contributor

Unfortunately, it is not that simple. For example:

Person A is a member of club 1 and 2,

Person B is a member of club 3.

Person C is a member of club 1,  3 and 5

How can I run an analysis that gives me

Person A, distance1=x, distance2=x

Person B, distance1=x

Person C, distance1=x, distance2=x, distance3=x

0 Kudos
DanPatterson_Retired
MVP Emeritus

since you have so few clubs, you could select each club and query for each member that belongs to that club and run the analysis. I am sure you can run an origin destination for each pair or multiple pairs if you want through or there is some option in setting up the network to specify a one origin to multiple destinations.   Building a model to fully automate it would be your next step

0 Kudos
BjornSchadenberg
New Contributor

That is what I did. However, I got 19 clubs and +/- 12.500 players. So I had 19 files with the players divided among them (with some players in multiple files, since they are member of multiple clubs). And then I joined all the 19 files to the original file. leaving for each player 19 columns, with some filled in and most of them not.

It got me what I needed, but I have to do this in future for multiple municipalities and multiple sports, so it is not very manageable.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Put your workflow into modelbuilder or write a script is pretty well your only option

0 Kudos