Python module for storing and querying geographical coordinates

前端 未结 7 532
忘了有多久
忘了有多久 2020-12-28 17:20

Is there a Python module where I can create objects with a geographical location coordinate (latitude and longitude), and query all the objects for ones which are within a 5

相关标签:
7条回答
  • 2020-12-28 18:24

    You can use SQLite which has an Rtree extension for doing exactly that kind of storage and querying. This approach is useful if your data is larger than the memory you want to use or you want to save and manipulate data between program runs. The actual storage and query code is in C which means it has to be compiled, but the benefit is extra performance over pure Python solutions like geopy. Either pysqlite or APSW will work for the SQLite access. (Disclosure: I am the APSW author.)

    0 讨论(0)
提交回复
热议问题