1

visual

I'm trying to find the best way to expand a polygon to contain the most points. A simple greedy algorithm might be to expand with a 1km square, placing the square at the border in a location that captures the most points at that step. But what if I have multiple steps, it might make sense to place a couple empty squares so that the polygon reaches a hub of points. Is there a name for this algorithm? Or a way to implement it with shapefiles?

Ben Hendel
  • 141
  • 6
  • 1
    Maybe a convex hull, but frankly I'm a little confused. Could you draw the polygon you're looking for? – David Eisenstat Mar 23 '21 at 01:39
  • I already have a polygon. Start from that polygon, what's the best path to enlargen it (say, by adding 1 by 1 squares contiguously to the border, so that I capture the most points. In the image above, it would likely be expanding straight down at the bottom in order to capture around 6 of the red points. I don't need to visit every point once in a path, I don't even need to hit every point. Just the best way to expand – Ben Hendel Mar 23 '21 at 05:08

1 Answers1

0

Do you mean the convex hull (https://web.mit.edu/urban_or_book/www/book/chapter6/6.4.7.html) ?

Algorithms for solving the convex hull problem are in https://en.wikipedia.org/wiki/Convex_hull_algorithms

The convex hull is related to the travelling salesman problem (https://en.wikipedia.org/wiki/Travelling_salesman_problem) ?

https://en.wikipedia.org/wiki/Travelling_salesman_problem#Exact_algorithms and https://cs.stackexchange.com/questions/1749/dijsktras-algorithm-applied-to-travelling-salesman-problem/1805

ralf htp
  • 9,149
  • 4
  • 22
  • 34