[aprssig] ISS Traffic

Andrew Rich vk4tec at people.net.au
Thu Sep 13 16:48:21 EDT 2007


Stephen,

One of the guys on the sig sent me a LINUX script that you can put in your
lat and lon and the perl script grabs google maps from you center - so many
tiles wide and high.

You then make up a geo file for the finished tiled image.

I can now "grow" as many google maps offile .

#!/usr/bin/perl

# download a bunch of google map tiles and stitch them together
# Shifty Death Effect Done by Noah Vawter in May, 2005.
# Computing Culture Groop, MIT Media Lab.
# Modified for compatibility with maps.7.js -> Mmaps.10.js by Ian (June
2005)
# Modified for currently URL format used by google
# and PNG support (instead GIF) by Andreas Weller, DF1PAW (Aug. 2007)

# with width 12
$sx = 3790;$sy = 2374;   # DF1PAW home
#$sx = 947;
#$sy = 523;

$w=10; # Width
$h=10; # Hight

open(PEDG,">pedg.html");

for($yd=0;$yd<$h;$yd++)
{
    for($xd=0;$xd<$w;$xd++)
    {
        $x=int($sx+$xd-$w/2);
        $y=int($sy+$yd-$h/2);
        $localnem = "tile$x,$y.png";

        # do we already have it locally?
        $val = open(CHECK,$localnem);
        if($val == 0){
            # http://mt.google.com/mt?v=w2.4&x=4190&y=6012&zoom=3
            #   523  wget
"http://mt.google.com/mt?v=.38&x=5376&y=-730&zoom=2"
            # have a look at the Url and modify these lines:
            $req="http://mt.google.com/";
            $nem="mt?v=w2.60&x=$x&y=$y&zoom=5";
            $url = $req . $nem;
            print "$url\n";
            $cmd1="wget \"$url\" ";
            print "$cmd1\n";
            system($cmd1);
            # $nem =~ s/\?/@/;
            $cmd2="mv \"$nem\" $localnem";
            print "$cmd2\n";
            system($cmd2);
        }

        print PEDG "<img src=$localnem>\n";
    }
}

# concatenate horizontal maps
# convert  tile005000.png  -page +129+0 tile006000.png -page +258+0
tile007000.png -mosaic o.png

for($yd=0;$yd<$h;$yd++)
{
    $cmd3 = "convert ";

    for($xd=0;$xd<$w;$xd++)
    {
        $x=int($sx+$xd-$w/2);
        $y=int($sy+$yd-$h/2);
        $localnem = "tile$x,$y.png";

        $xsh = $xd*128;
        $ysh = $yd*128;
        $cmd3 .= "$localnem ";
    }

    $cmd3 .= "+append tmp$yd.png";
    print "$cmd3\n";
    system($cmd3);
}

# concatenate horizontal strips
$cmd4 = "convert ";

for($yd=0;$yd<$h;$yd++)
{
    $localnem = "tmp$yd.png";
    $cmd4 .= "$localnem ";
}

$cmd4 .= "-append output.png";
print "$cmd4\n";
system($cmd4);




----------------------------------------------------------------------------
Andrew Rich VK4TEC
vk4tec at people.net.au
http://www.tech-software.net


  -----Original Message-----
  From: Stephen - K1LNX [mailto:k1lnx at k1lnx.net]
  Sent: Friday, 14 September 2007 6:24 AM
  To: vk4tec at people.net.au
  Subject: Re: [aprssig] ISS Traffic


  Good work as always Andrew :)

  Hey had a question on this:

  http://vk4tec.no-ip.org/snapshot.jpg

  What are you doing with your maps? They look great! I'd like mine to look
the same way as far as color schemes etc using the Tiger maps but can't seem
to find the time to learn how they work.....

  73's
  Stephen
  K1LNX


  On 9/13/07, Andrew Rich <vk4tec at people.net.au> wrote:
    This maybe of use to someone.

    www.tech-software.net

    "ISS Traffic"



    ------------------------------------------------------------------------
----
    Andrew Rich VK4TEC
    vk4tec at people.net.au
    http://www.tech-software.net




    _______________________________________________
    aprssig mailing list
    aprssig at lists.tapr.org
    https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig





  --
  Stephen Brown - ARS K1LNX
  Johnson City, TN EM86uh
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.485 / Virus Database: 269.13.16/1004 - Release Date: 12/09/2007
5:22 PM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/aprssig_lists.tapr.org/attachments/20070914/7d7dfe54/attachment.html>


More information about the aprssig mailing list