Differences between revisions 11 and 12
Revision 11 as of 2006-04-15 19:37:36
Size: 1795
Comment:
Revision 12 as of 2008-01-18 12:56:20
Size: 1795
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
attachment:getmap.py [[attachment:getmap.py]]
Line 14: Line 14:
[[GoogleAd()]] <<GoogleAd>>
Line 56: Line 56:
[[GoogleAd()]] <<GoogleAd>>

This piece of software is for getting maps off the expedia server. It's basically similar to the one that comes with gpsdrive, but mine has some better features:

  • it's python ;-)

  • always downloads maps of same area to the same file (we are being nice to the server)
  • does filename tagging (useful for keeping multiple mapsets)
  • lots of stuff I forgot

getmap.py

...if you have problems, contact me at radek@podgorny.cz. If not, I would appreciate if you wrote some better documentation on how to use it...

VERY basic documentation

/!\ Feel free to improve! (Use the magic edit button)

The way to call the script goes here:

./getmap.py start-latitude start-longitude end-latitude end-longitude scale tag

where scale is one of the available expedia scales (the script will tell you what number to enter when you do it incorrectly). The tag parameter is present to distinguish between different mapsets.

To actually do something, you have to append a --download or --writetofile parameter.

The --overwrite parameter is quite self-explanatory.

For simplicity I suppose you run all the commands in ~/.gpsdrive/ directory. (That even the script itself is located here.)

So, let's do something useful:

./getmap.py 49.9398 14.2170 50.1825 14.7129 3950 praha --download

This will download the maps. But we need to tell GPSDrive about them, so let's issue:

./getmap.py 49.9398 14.2170 50.1825 14.7129 3950 praha --writetofile

This will create a file named praha.txt with relevant data.

Next we include the data in GPSDrive database:

cat praha.txt >> map_koord.txt

We're done :-)