The database is a really good idea. I doubt that SQLite keeps the whole database file in memory itself. Could even locate the file to ram disk or similar as a speed bonus.
You can still use the same code though to do the lookups (with minor modifications):
In reply to Re^3: Reducing memory footprint when doing a lookup of millions of coordinates
by admiral_grinder
in thread Reducing memory footprint when doing a lookup of millions of coordinates
by richardwfrancis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |