Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
緯度と経度の2万以上の都市のデータベースがあり、このデータセットに対して多くの最も近いポイントクエリ(特定の緯度と経度のポイントに最も近い都市)を作成する必要があります。
R-TreeまたはQuadTreeはこれに最適なデータ構造になると思いますが、機能するrubyの実装を見つけることができませんでした。何でも知ってますか?
上記のタスクを解決するのに役立つkd-tree gem を見つけました
または試してみてください:
https://github.com/iterationlabs/rquad