I have a set of points in a city, each with a maximum distance radius of 0.5 - 1.5 miles. From this set of points, I'd like to create a small number of 'meeting points', i.e. locations that are central to a multiple points while not violating the constraint of <= maximum distance raidus). Those points far away from the others will have a meeting point of 1.
My first attempt was to buffer each point and find the intersection with the highest number of overlaps, but it proved very computationally expensive because I compared each new intersection with all other nearby intersections to determine the points reachable within the area.
My second attempt was to fill each buffer with possible meeting points every 100 meters & run a distance calculation on each one to determine which points they could reach, but again, computationally expensive and prone to miss edge cases.
I'm now thinking of creating a centroid of all points where at least 1 point is within radius(p1)+radius(p2)
of all the other points, which would work as is, if they all had the same radius. Since the radii vary, I thought I could adjust the centroid by moving it closer to the mean of the points it doesn't reach until it either fits or not.
Am I overcomplicating this? It seems like there should be a more elegant solution, but I can't think of it. Any pointers in the right direction would be very welcomed.
Aucun commentaire:
Enregistrer un commentaire