maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Downloading Maemo Mapper maps on PC, is it possible? (https://talk.maemo.org/showthread.php?t=29365)

Lord Raiden 2009-06-08 13:44

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Actually, now that I look at the code, it should work for any of the map URI's. I may not understand python all that well, but I understand enough to realize that a few tweaks would make this usable for anything. :) Thanks Sencer!!

Mara 2009-06-08 14:04

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Quote:

Originally Posted by Lord Raiden (Post 294625)
Actually, now that I look at the code, it should work for any of the map URI's. I may not understand python all that well, but I understand enough to realize that a few tweaks would make this usable for anything. :) Thanks Sencer!!

yeah.... it could be as simple as changing one line containing the map source URL. That seem to be on line 20.

And if someone has more time... maybe all map repositories can be added and add few new lines of code to allow selection of what maps to use.

Lord Raiden 2009-06-08 19:16

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Ugh, I'd love to do that for you, but again, I don't know python all that well. Otherwise I'd already have done it. Hmmf. Maybe this is finally an excuse for me to get around to learning Python. ;)

Laughing Man 2009-06-08 19:26

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Hmm have you tried using this with existing map databases so a new one doesn't have to be created?

Sencer 2009-06-08 21:30

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
It also works with an existing sqlite3-database used by maemo mapper.

Lord Raiden 2009-06-08 22:40

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Woohoo! :d

Laughing Man 2009-06-09 03:41

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Hmm...

Code:

./getmaps -t 35.231844 -b 38 -l -80.895381 -r -81 -z 6 GStreet
You asked for 3150 tiles
Traceback (most recent call last):
  File "./getmaps", line 179, in <module>
    main()
  File "./getmaps", line 168, in main
    loadTile (db, x, y, zoom, i, numTiles)
  File "./getmaps", line 88, in loadTile
    if (tileExists (db, x, y, zoom)):
  File "./getmaps", line 75, in tileExists
    % (zoom, x, y))
sqlite3.DatabaseError: file is encrypted or is not a database

Tried renaming GStreet into GStreet.db and it still didn't help.

qviri 2009-06-09 04:18

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Laughing Man, file/access permissions?

Sencer 2009-06-09 04:48

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Uh, sorry, i think i misunderstood you. you cannot convert an "old" (non sqlite) database from mapper. an sqlite-database has the ending.sqlite not .db.

Sencer 2009-06-09 09:38

Re: Downloading Maemo Mapper maps on PC, is it possible?
 
Laughing Man: Try "getmaps <dbfile> [options]"
The help is wrong in this case... sorry! (normally it doesn't matter where you place the options but it seems it does in this script)

Here is a demo:
./getmaps test.sqlite -t 68.78825 -l 17.00327 -b 62.50560 -r 15.6039 -z 9 -z 8 -z 7 -z 6 -z 5


All times are GMT. The time now is 17:36.

vBulletin® Version 3.8.8