Improved radar images on mobile phone

Discussion in 'Australian Motorcycles' started by Rod Bacon, Jul 17, 2006.

  1. Rod Bacon

    Rod Bacon Guest

    Last week, I found the a to some PHP scripts on a local website that
    allow you to view the BOM radar images on a WAP-enabled phone.

    To take things a step further, I decided to hack up my own version,
    adding some extra functionality (and a significant speed increase)
    along the way.

    The base script is located at http://baconplanet.com/wap/radar.cgi

    If you hit this with your PC web browser, you'll see an example of the
    output (in PNG format). If you don't provide any parameters, the
    default city is Melbourne, zoom level is 80% of original, image centred
    and of dimensions 180x150 pixels.

    Here's the nifty bit. By providing parameters in the URL that you
    request, you can change the view considerably. Using these
    customisations, you should be able to get the images looking good on a
    variety of small-screened mobile devices, and tailored to suit your
    area.

    Simply add ?PARAM1=XXX&PARAM2=XXX&PARAM3=..... to the end of the URL.

    Valid parameters are;

    city (MEL, SYD, PER, CBR, ADL, BNE, DRW, HBA)
    zoom (% of original BOM image - default is 80)
    width (desired image width, default is 180 pixels)
    height (desired image height, default is 150 pixels)
    xPan (horizontal pan this number of pixels. Negative numbers for left,
    positive for right, default 0)
    yPan (vertical pan this number of pixels. Negative numbers for up,
    positive for down, default 0)

    Some examples of the above usage are below;

    Sydney, 90% zoom, image shifted left 10 pixels, and down 10 pixels.
    http://baconplanet.com/wap/radar.cgi?city=SYD&zoom=90&xPan=-10&yPan=10

    Perth, 120% zoom, image size 320x240 pixels.
    http://baconplanet.com/wap/radar.cgi?city=PER&zoom=120&width=320&height=240

    Enjoy!
     
    Rod Bacon, Jul 17, 2006
    #1
    1. Advertisements

  2. Rod Bacon

    Rod Bacon Guest

    Thanks to those "beta testers" who unsuccessfully tried to crash my
    sever by inputting 10000 as the zoom level.
     
    Rod Bacon, Jul 17, 2006
    #2
    1. Advertisements

  3. Rod Bacon

    Nev.. Guest

    This is a link to the index of all Australian weather radar sites.

    http://telstra.pni.co.jp/premium/imagery/aus_radar/index.wml

    When you select a radar there is also option to "animate radar" which
    will show the animation same as on the BOM website.. I think most new
    phones should be able to handle animated gifs.

    Nev..
    '04 CBR1100XX
     
    Nev.., Jul 17, 2006
    #3
  4. Rod, This is excellent and very useful. Nice one.

    How long will you keep it running on your server?

    Couldn't get the x & y position shift to work though. any thoughts?
     
    Cider Monster, Jul 18, 2006
    #4
  5. Rod Bacon

    Rod Bacon Guest

    1. At this stage, I can see no reason why it won't stay up there
    permanently.

    2. Make sure the xPan and yPan variables are entered with the correct
    case (the capital "P"). I just tested it again, and it's working fine.

    Cheers.
     
    Rod Bacon, Jul 19, 2006
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.