Optimizing Large-Scale OpenStreetMap Data with SQLite

jtarchie.com
submitted
a year ago
byboredgamertoprogramming

Summary

The OpenStreetMap (OSM) data is categorized into three main elements: nodes, ways, and relations. The original data was in a compressed binary format. The goal of converting it into an SQLite database was to leverage the database’s search capabilities.

A search for “Costco’s” is incredibly fast, under a millisecond. The data set is a read-only data set, so there may be ways to compress the data. A search for the word “cafe’ is also incredibly fast.

The query is still sub-50ms. All this provides a read-only queryable data in a single file. The project evolved from merely transferring format to optimizing it for efficient search. This highlights the importance of iterative refinement and the power of combining different technologies.

13
The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

4 Comments

3
iareunique
a year ago
Seems like an index would help speed things up right?
3
boredgamerOP
a year ago
It would. It might not give the speed they eventually reached here but it would definitely go a long way.
3
kaiserseahorse
a year ago
This is a pretty cool performance improvement! I can't believe you could search through all that data in that quick time.
2
boredgamerOP
a year ago
It's novel, to me, how they approached speeding this up which I thought was interesting.