Best way of identifying overlapping polygons

Topics: Algorithms
Apr 12, 2010 at 1:14 AM

Hi guys!

I'm just wondering what is the fastest way of identifying overlapping polygons.

I was thinking of doing this:

bool overlaps = geom.Overlaps(testGeom);

but I'm afraid it will be very slow coz i'll have to do this for each and every polygon.

Any ideas?

 

 

 

Apr 14, 2010 at 11:08 PM

anyone?

Developer
Apr 15, 2010 at 6:25 AM

I can't give you a specific answer. But in general you should filter on bboxes first and also you would like to have the data in a quadtree structure for fast search.

Paul

Coordinator
Apr 15, 2010 at 2:23 PM

Since SharpMap only tests for bounding boxes, a task like this would require NetTopologySuite (NTS) functionality, e.g. spatial indices and relate computer.
Therefore, perhaps this is a good place to ask this question.

FObermaier

Apr 15, 2010 at 11:32 PM

@FObermaier: thanks for the link....

@pauldendulk: can you elaborate on quadtree structure?