Is there an algorithm, which can partition the space into N number of partitions given a random number N, where N<50

StackOverflow https://stackoverflow.com/questions/10269397

Question

I read about R-Tree, kd-tree, bounding interval hierarchy etc for space-partitioning. I found that these data structures are useful for spatial querying. Although, they do partitioning, but I do not know how to retrieve those partitions from the data structure. So, my question boils down to "Given a number N and a map containing say X number of polygons, can I get N number of partitions that contain approximately equal number of polygons?"

Was it helpful?

Solution

Well, if you want exactly N partitions, any of the common bulk loading strategies for the R-Tree should work. It won't necessarily be optimal, but you can force these to produce exactly N partitions of approximately equal size.

The k-d-tree will have objects that are in neither the left nor the right side. But you can use the k-d-tree bulk loading strategy and modify it to produce N partitions. Another simple yet sometimes quite effective way of bulk-loading and R-tree, actually.

When you constrain N to be a power of 2, or even better the dth power of some number, the splits will usually become better. So splitting a 3D dataset in 9 pages is much cleaner to implement than splitting it into 8 pages.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top