Welcome to MapForums!

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

## Finding the center of a group of pushpins

This is a discussion on Finding the center of a group of pushpins within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am mapping the addresses of contacts for a survey and want to find central locations among those addresses to ...

1. Senior Member Black Belt
Join Date
Jul 2002
Posts
5,137

## Finding the center of a group of pushpins

I am mapping the addresses of contacts for a survey and want to find central locations among those addresses to use as meeting points for the participants. There will be 50+ contacts in each geographic area(roughly city-size) around the country, so it would be very helpful to automatically find central locations among them in each area, perhaps several per area(within 15mins drive time). Anyone know of a way to do this?

2. What kind of central locations?

If you are looking for a simple centroid then this can be calculated and would give you mathematical centre of the locations. It and could be easily coded up in Visual Basic, or the language of your choice.

As you are only using pins over the area of a city, then a simple euclidean calculation could be used - ie. ignore that the Earth is a sphere.

You're talking about multiple locations for a group - do you mean finding multiple places of interest that MapPoint knows about that are also near the mathematical centre?

Richard

3. Senior Member Black Belt
Join Date
Jul 2002
Posts
5,137
winaed,

Yes, I thought about developing an application in vb to find the mathematical center of group also(a euclidean algorithm would work), but thought that there may be a built-in function or add-on for such a thing. Using MapPoint to find a location(such as a resturant) near the mathematical center would be the ultimate solution. What I'm looking to do is identify clusters of contacts(say within 15mins of each other) among those in each region and then find a central meeting point for those contacts. To be able to highlight those groupings and have MapPoint find the meeting point(or close approximation) would be the goal. Thanks for your help.

4. Create a Location object for your calculated centroid, then use the Location's
FindNearby method to find "places of interest" nearby.

I haven't tried it, but I think you can select the type of place according to what is currently displayed.

Automatically identifying the contacts for each cluster is a bit more involved. A brute force search/comparison is NP-complete of course (takes a long time). There are some cluster analysis algorithms around though - you might find something by Googling. I found some Fortran code to do it, but haven't got around to trying to get it to work yet.

Richard