This project has moved and is read-only. For the latest updates, please go here.

Best way of identifying overlapping polygons

Topics: Algorithms
Apr 12, 2010 at 2: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 15, 2010 at 12:08 AM


Apr 15, 2010 at 7: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.


Apr 15, 2010 at 3: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.


Apr 16, 2010 at 12:32 AM

@FObermaier: thanks for the link....

@pauldendulk: can you elaborate on quadtree structure?