I am dealing with a large group of entities that store locations. They are displayed on the map. I am trying to find an effective way to group nearby objects into one entity when viewing from a higher location. So, for example, if you are very tall, when looking down you will see one entity representing a group of closely spaced objects in an area. Scaling close enough would divide this entity into the objects it contains.
Is there an efficient algorithm for this? I thought of simply hiding a view based on height and dropping objects into grid rectangles based on location, and then displaying the box. My only problem is that all entities are in the upper right corner of this window, and the object that will represent them can be centered in the middle instead of the location of the group of objects.
Any thoughts or ideas?
source share