Storing and Querying GPS Coordinates Effectively

后端 未结 8 1942
一整个雨季
一整个雨季 2021-02-02 17:31

I want to create a large database of GPS coordinates that can be queried by saying \"Return all coordinates that are within \'n\' metres of [this coordinate]\".

I need i

8条回答
  •  臣服心动
    2021-02-02 17:36

    We can use the Geohash Algorithm.

    The beauty of a geohash is in how it’s constructed. In brief, geohashes are a type of grid spatial index, where the world is recursively divided into smaller and smaller grids with each additional bit. (https://www.mapzen.com/blog/geohashes-and-you/)

    You can find its description on Wikipedia (https://en.wikipedia.org/wiki/Geohash).

    I included the next videos for a quick intuition.

    https://www.youtube.com/watch?v=UaMzra18TD8

    https://youtu.be/mx1mMdHBi5Q?t=1955

    In the next article you can find implementation of such an algorithm for AWS database DynamoDB. https://read.acloud.guru/location-based-search-results-with-dynamodb-and-geohash-267727e5d54f

    please, give some claps to James Beswick's article.

提交回复
热议问题