sqlite, index for geographical coordinates?

后端 未结 1 1348
栀梦
栀梦 2021-01-16 17:49

I have a SQLite database that contains geographical data. My table is defined like this:

     CREATE TABLE GEO_OBJECTS (ID VARCHAR(30) PRIMARY KEY     NOT NU         


        
1条回答
  •  一生所求
    2021-01-16 18:18

    A normal index might help for some one-dimensional interval queries, but in two or more dimensions, you need an index designed for such queries, such as an R-tree.

    SQLite does have an R-tree module, but it might not have been compiled into your DB driver.

    You might consider SpatiaLite, which is derived from SQLite and has many useful functions (such as computing the great circle distance).

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