Top |
Post New Question |
Read All |
MP2K Asks Microsoft
625
Naomi
-
March 11, 2002
I have a dataset of 390 hospitals with zipcodes, divided into high and low volume categories. I would like to be able to calculate the average distance from any given low-volume hospital to the closer high-volume hospital. I tried to look at Gilles Kohl message cited in the answer to another question here with a similar problem, but was not able to find it in the newgroup. Thanks!
Answer:
This is a fairly brute force problem. First I assume you have MapPoint
datasets with this data, right? Also, what distance do you want, crow flight
or driving? Basically you would have to do code with an outer loop to access
each low-volume hospital, and inner loop to process each high-volume
hospital. Then calculate the distance you want between each outer-inner loop
pair. Either use the Distance method to get the crow flight distance, or
create a route with each set of inner-outer loop points as waypoints to get
the driving distance. Save the results to a database. Then you can run a
query to find the minimum distance for each low-volume hospital. Not too
hard, but a fair number of steps involved.
- Walt Cygan
Post New Answer / Follow-up