Data structure for fast line queries?

后端 未结 2 1504
粉色の甜心
粉色の甜心 2020-12-17 03:43

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

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-17 04:40

    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.

提交回复
热议问题