An Efficient Secondary Index for Spatial Data Based on LevelDB

Spatial data has the characteristics of spatial location, unstructured, spatial relationships, massive data. However, the general commercial database itself is difficult to meet the requirements, it’s non-trivial to add spatial expansion because spatial data in KVS has brought new challenges. First, the Key-Value database itself does not have a way to query key from its value. Second, we need to ensure both data consistency and timeliness of spatial data. To this end, we propose a secondary index based on LevelDB and R-tree, it supports two-dimensional data indexing and K-Nearest Neighbor algorithm querying. Further, we have optimized the query of a large amount of spatial data caused by the movement of objects. Finally, we conduct extensive experiments on real-world datasets which show our hierarchical index has small index and excellent query performance.