Changes between Version 15 and Version 16 of DataStorageEN

Jul 27, 2011, 7:39:53 PM (9 years ago)
Martin Kolman



  • DataStorageEN

    v15 v16  
    1515== sqlite tile storage == #sqlite
    16 ''available since '''V0.16-1'''''
     16Sqlite tile storage is ''available since '''V0.16-1'''''. It saves space on devices with FAT32 and related filesystems by storing tiles in  database instead of thousands of files and folders.
    18 '''What is this good for ?'''[[br]]
    19 As mentioned earlier in the modRana thread on and also in a related Mappero thread, tiles take up more space than expected because each tile, even if only 500B in size, takes a whole 64kB cluster.
    20 When using sqlite for tile storage, there are basically just 2 files per layer, not the usual tens of thousands of files and folders.
    22 '''How to enable sqlite tile storage ?'''[[br]]
    23 Go to '''options'''->'''map''' and switch '''tile storage''' from '''files''' to '''sqlite'''.
    25 '''Is it stable ?'''[[br]]
    26 It seems to work OK for both normal automatic tile download (including overlay) and batch download. But some errors can still can show up, so please report any unusual behavior, thanks ! :)
    28 '''What about the 4GB maximum file size limit on FAT32 ?'''[[br]]
    29 When a size of the storage database reaches 3.7 GB, a new one is added. The is no limit on the number of storage databases.
    31 '''How does it work ?'''[[br]]
    32 The tiles are stored in a sqlite database as blobs. There are two types of database files, ''lookup.sqlite'' and ''store.sqlite''. The lookup file stores a database that indicates in which store the requested tile is. The store file has the actual data. Multiple stores should be numbered in ascending order, starting from 0:
    33 {{{
    34 store.sqlite.0
    35 store.sqlite.1
    36 store.sqlite.2
    37 etc.
    38 }}}
    40 The storage database looks like this:[[br]][[br]]
    41 {{{table tiles (z integer, x integer, y integer, store_filename string, extension varchar(10), unix_epoch_timestamp integer, primary key (z, x, y, extension))}}}[[br]][[br]][[br]]
    42 The store databases look like this:[[br]][[br]]
    43 {{{table tiles (z integer, x integer, y integer, tile blob, extension varchar(10), unix_epoch_timestamp integer, primary key (z, x, y, extension))}}}[[br]][[br]]
    44 The only difference in the structure is that the lookup databases only stores the name of the store for given coordinates and the store database stores the actual blob.
    45 Both also have a table called version which has an integer column called v.  There is a single 1 inserted, which indicates the current version of the table.
    47 Database files are stored in the corresponding layer folders.
    49 When looking for a tile in the database, modRana first asks the lookup database and when it gets an answer, it asks the store described in the store_filename for the given tile coordinates.
    51 '''Could this be used by other navigation apps ?'''[[br]]
    52 Why do you think I just described how it works ? :D
     18For more information, check out the detailed [wiki:SQLiteStorageDescriptionEN SQLite tile storage description & specification] page.
    5420== POI ==
     21'''P'''oints '''O'''f '''I'''nterest are stored in a SQLite database file in '''~/.modrana/POI/modrana_poi.db'''
     23'''Maemo 5@N900''': POI are stored in '''/home/user/MyDocs/.maps''' and the file is called:
     24 * '''modrana_poi.db''' if POI sharing with Mappero is disabled (default)
     25 * '''poi.db''' if POI sharing with Mappero is enabled
    5627== Tracklogs ==
     28Tracklogs are stored in '''~/.modrana/tracklogs''' in folders representing tracklog categories (by default logs, online, misc).
     30'''Maemo 5@N900''': The main tracklog folder is:
    5834== Configuration files ==
     35Configuration files are in '''~/.modrana/'''
    6037=== Persistent setting database ===
     38The persistent settings database is stored using the Python Marshal module inside '''~/.modrana/options.bin'''
    6240=== Main configuration file ===