Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: scripts to download maps...for linux?

                  
   
  1. #1
    DCEmu Newbie
    Join Date
    Mar 2008
    Posts
    15
    Rep Power
    0

    Default scripts to download maps...for linux?

    I was wondering (maybe in7ane or Deniska could help)...

    If this applies,

    I have updated the scripts section with a new cygwin script, which gets the maps from MSN maps/ Virtual Earth engine (http://local.live.com)

    usage:
    ./getVEmap.sh [latitude] [longitude] [base zoom] [map size]
    example:
    ./getVEmap.sh 40.619442 -73.970926 1 16
    latitude/longitude must be in decimal format
    base zoom: 0-16
    map size: number of 256x256 pix tiles in 1 row
    map size: 16 will create an equivalent of 4096x4096 pixel map at base zoom
    ...would it then be possible just to run getVEmap.sh under real linux those scripts in order to download maps from MSN or Google?

    Thanks for a quick reply. Regards.

  2. #2
    DCEmu Rookie fokia's Avatar
    Join Date
    Aug 2006
    Posts
    117
    Rep Power
    67

    Default

    cygwin is just an unix emulator for window$

    Those scripts should work fine (or with minor changes) under native linux

    I've only tried them under cygwin in an early stage before in7ane came along...

    good luck!

  3. #3
    DCEmu Newbie
    Join Date
    Mar 2008
    Posts
    15
    Rep Power
    0

    Default

    Thanks for the fast reply, Fokia.

    And...would it be possible to download maps from Google Maps using this script...or it is only valid for MSN Maps?

    Sorry if it seems dumb...

  4. #4
    DCEmu Regular
    Join Date
    Aug 2006
    Posts
    299
    Rep Power
    68

    Default

    The Google Maps url changed slightly from when the scripts were initially used - you will need to add the extra components and make sure to set a user agent for wget (or whatever the image is downloaded with, also the mt# varies randomly as does the length of Galileo, for example:

    http://mt1.google.com/mt?n=404&v=w2.69&hl=en&x=9&y=12&zoom=12&s=Galileo

    http://mt3.google.com/mt?n=404&v=w2.69&hl=en&x=9&y=13&zoom=12&s=G

    mapURL.cs in GMDL is semi-comprehensible for other tile sources

  5. #5
    PSP Coder deniska's Avatar
    Join Date
    Jul 2005
    Posts
    1,557
    Rep Power
    78

    Default

    You should be able to get google tiles by using
    ./getmap.sh from the attached archive:
    ./getmap.sh 40.64027 -73.98365 1 16
    (use different lon/lat coordinates and zoom values)

    I tested the script on Ubuntu Gutsy so it should work on other linux distros..
    Apparently the google api version changed from 2.21 to 2.91 or higher

    You may need to chmod the files to make them executable/writable (chmod 777 *)

  6. #6
    DCEmu Newbie
    Join Date
    Mar 2008
    Posts
    15
    Rep Power
    0

    Default

    Quote Originally Posted by deniska View Post
    You should be able to get google tiles by using
    ./getmap.sh from the attached archive:
    ./getmap.sh 40.64027 -73.98365 1 16
    (use different lon/lat coordinates and zoom values)

    I tested the script on Ubuntu Gutsy so it should work on other linux distros..
    Apparently the google api version changed from 2.21 to 2.91 or higher

    You may need to chmod the files to make them executable/writable (chmod 777 *)
    ---Deniska, worked perfectly straight ahead!! Thank you so much. I did chmod a+x and ran smoothly, the map was displayed in MapThis! flawlessly.

  7. #7
    DCEmu Rookie fokia's Avatar
    Join Date
    Aug 2006
    Posts
    117
    Rep Power
    67

    Default

    NICE!

    I didn't remember that the API versions changed - now I remember that had to change it in the initial scripts.

    Glad you could make it!

  8. #8
    DCEmu Newbie
    Join Date
    Mar 2008
    Posts
    15
    Rep Power
    0

    Default

    Uuuups!!!

    There's something I'm missing, I'm affraid.

    Why can I get no full zoom with ./getmap.sh??

    This
    is what I get with GMDL at full zoom (notice the slider position!).

    And this is what I get with ./getmap.sh at full zoom (again check the slider!).

    It seems it doesn't matter which parameters do I enter in ./getmap.sh, I am not able to download an image as close as I do with GMDL.

    ./getmap.sh one is at 1 128, being 1 base zoom and 128 size of map.

    I don't think it is related to the size of the map value, since it will download more tiles, but not closer.

    So...how to get around this?

    Thank you everyone for a reply...

  9. #9
    PSP Coder deniska's Avatar
    Join Date
    Jul 2005
    Posts
    1,557
    Rep Power
    78

    Default

    your screen shot indeed shows zoom 1 of the google maps.... keep in mind that the original script and the docs were created prior to roll out 0 & negative zoom values by google due to acquisition of better aerial imagery...
    Actually using 0 & -1 as zoom value seems to work ok for me with the latest version of the script... Let me know if you still encounter problems..

  10. #10
    DCEmu Newbie
    Join Date
    Mar 2008
    Posts
    15
    Rep Power
    0

    Default

    Quote Originally Posted by deniska View Post
    your screen shot indeed shows zoom 1 of the google maps.... keep in mind that the original script and the docs were created prior to roll out 0 & negative zoom values by google due to acquisition of better aerial imagery...
    ---Mmmmh....I had no idea about that..

    Seems interesting.

    Actually using 0 & -1 as zoom value seems to work ok for me with the latest version of the script... Let me know if you still encounter problems..
    ----Works wonderfully with zoom=0. And regarding the script version...where and how can check if it is the latest one? And how can I be noticed when a new version is out?

    Thank you so much for the help, Deniska!!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •