I know that I can use a KD-Tree to store points and iterate quickly over a fraction of them that are close to another given point. I\'m wondering whether there is something
Another option - and the most commonly used one for spatial indexing in disk-based database systems - is the R-Tree. It's a bit more complicated to implement than a KD-Tree, but it's generally considered to be faster, and has no problem indexing lines and polygons.