rinigus / geocoder-nlp

Geocoder library based on libpostal normalization of libosmscout generated database
MIT License
21 stars 1 forks source link

Database format revision #71

Open rinigus opened 1 year ago

rinigus commented 1 year ago

As has been highlighted by issue eventually caused by Kyotocabinet (https://github.com/rinigus/osmscout-server/issues/419), Goecoder NLP depends on a library that is not maintained anymore (see message at https://dbmx.net/kyotocabinet/). So, it makes sense to look for alternatives.

Currently, we use 3 data files to store one region:

Over those, SQLite provides links between records forming hierarchies and spatial search index.

In principle, we can swap the full set.

rinigus commented 1 year ago

Kyotocabinet can maybe be replaced by just table in SQLite using the same format as in Kyotocabinet:

(primary index): BLOB string of ints
rinigus commented 1 year ago

Kyotocabinet replacement:

LMDB http://www.lmdb.tech/doc/

rinigus commented 1 year ago

Kyotocabinet replacement:

RocksDB: https://rocksdb.org/

Has spatial indexing as well, see https://rocksdb.org/blog/2015/07/17/spatial-indexing-in-rocksdb.html . Although, sounds as tuned for showing tiles.