Search code examples
c#sql-server-2008virtual-earth

Data visualization with Virtual Earth and SQL


Scenario: I have a list of addresses (they have already been converted to lat/long) and the conference that the person attended.

What I want: I want to add a circle shape to a Virtual Earth map that covers, let's say, 90% of the attendees to a conference. I will repeat this for each conference. This will show me how much the different conference "attendance areas" overlap each other. The reason for the 90& is to exclude the "outliers", those that aren't in the main "attendance area".

So the question: What is the algorithm or SQL spatial query do get the above data set (the 90%)? I think I can take it from there (ie. how big to make the circle, where to place it, etc.)


Solution

  • For each person, total the distances to all other people. Sort by these totals, and remove the highest 10%.

    Then take to two remaining people that are farthest apart, and place your center there. The distance between the farthest people is your diameter.