View Single Post
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#784
Originally Posted by beermad View Post
Terrific application and amazingly full of features considering how new it is.

As an interim measure until you manage to include a feature to import tile files into the database, I'm writing a Perl script to do the job.
There is some rough sqlite tile storage documentation on t the modRana project website.
Its currently quite basic so please let me know if you find any errors or omissions.

Originally Posted by beermad View Post
I can see from the structure of the SQLite databases that it's designed to have multiple store.sqlite.n files (presumably because otherwise the store could get ridiculously large: it looks like my 200 000 tile files would make for a file of about 2G). What logic do you use to decide when to create a new one? Is it when the last one gets to a certain size threshold?
It lists the folder for available store files, then it checks them sequentially until it finds one that is under the maximum size threshold. If no such store is found, new one is created. Maximum store size threshold is 3.7 GB.

The Python code that does this in modRana is here:
http://modrana.org/trac/browser/trun...eTiles.py#L200

Originally Posted by beermad View Post
Once I've incorporated that into my script I'll post it here for anybody who might find it useful.
Can including it in the modRana package once it's done ? - Only if you don't mind, of course.
This way it could be placed in /usr/bin and would be easily callable as it would be in $PATH.

Originally Posted by beermad View Post
Looks like it's a slow process if you've got a lot of tiles, though; my current test job has been running for about 90 minutes and has only imported 13 000 tiles.
I hit something similar - the solution was not to commit after every tile but just once every 50 or so tiles. This made the process quite faster IIRC.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)

Last edited by MartinK; 2011-07-23 at 18:31.