This project has moved. For the latest updates, please go here.

quadtree creation performance problem

Topics: SharpMap v0.9 / v1.x
Sep 14, 2010 at 8:06 AM


I am using SharpMap to display maps loaded from a custom data format. I implemented a data provider by implementing the IProvider interface and all works properly. My problem is that it is very slow to load data from a big layer, and I am currently trying everything to speeding it up. My first idea was to serialize all the geometry in files saved on local disk in order to cache huge layer data and be able to load them faster. However after profiling the "load from cache" version, things are a lot faster but there is still a performance bottleneck: the creation of the quadtree used to speeding up intersection requests. My problem is that I do not have a clue about how this works internally (I basically took the same heuristic settings used in the other sharpmap providers). Given that I am already saving geometric data on disk, I am looking for a way to also save the quadtree once it has been computed, but it seems there is no way to create a quadtree except by computing it from a list of objects.

Does anyone have an idea of how I can get rid of the spatial index creation bottleneck?

Sep 14, 2010 at 8:11 AM

sorry for the post, I just see there was save/load methods implemented in the quadtree class.... it should solve my problem