Author Topic: How to Run US Animated Radar on Google Maps  (Read 134665 times)

0 Members and 1 Guest are viewing this topic.

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #175 on: July 22, 2011, 11:38:29 AM »
Yea, I changed them all and it didn't matter.

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #176 on: July 22, 2011, 11:47:00 AM »
The settings in my php5.ini file allow fopen
;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = On

Offline K4KMG

  • Contributor
  • ***
  • Posts: 106
    • K4KMG.com
Re: How to Run US Animated Radar on Google Maps
« Reply #177 on: July 22, 2011, 11:48:01 AM »
Without the table being setup properly, there is no where for the data to go. Your table should, at least and even without data, look like mine. Currently, you have no fields that the data can populate.
Living 'Off Grid" in Central Florida. Pics at k4kmg.com

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #178 on: July 22, 2011, 11:51:13 AM »
I think it's because it's hanging up before it gets anything. Can you send or post your table.php file for me. I didn't change anything in mine but it looks incomplete.

Offline K4KMG

  • Contributor
  • ***
  • Posts: 106
    • K4KMG.com
Re: How to Run US Animated Radar on Google Maps
« Reply #179 on: July 22, 2011, 11:58:39 AM »
My ini file is the same as yours.

table.php
<?php
require("crrdr.php");

# CREDIT - DO NOT REMOVE WITHOUT PERMISSION
# Constituent Supplementary File
# Author:         Jordan Gerth, development at wiscwx dot com
# Documentation:  http://www.wiscwx.com/jordan/crrdr/index.html
#####################################

if ($dispm == 1) {
 $swt = "Graphic";
 $swtnu = 0;
} else {
 $swt = "Text";
 $swtnu = 1;
}

if ($endol < $maxrw) $disher = $endol;
else $disher = $maxrw;
?>
<h3 style="font-family: <? echo $hff; ?>;"><? echo $hder; ?></h3>
<h6 style="font-family: <? echo $ff; ?>;"><? echo $vdts; ?>&nbsp;
(<a href="javascript:history.go();">Refresh</a>)</h6>
<table width="<? echo $width; ?>" cellpadding="<? echo $cllpa; ?>" cellspacing="<? echo $cllsp; ?>"
   border="<? echo $brdr; ?>" bordercolor="<? echo $bclr; ?>">
<?php echo $html; ?></table>
<table width="<? echo $width; ?>" cellpadding="0" cellspacing="0" border="0"><tr>
<td align="left"><font style="font-family: <? echo $ff; ?>; font-size: 9px;"><b>
Total number of storm cells on radar: &nbsp;<? echo $endol; ?></b>;
&nbsp;Number of storm cells on table: &nbsp;<? echo $disher; ?></font></td>
<td align="center"><font style="font-family: <? echo $ff; ?>; font-size: 9px;">
<a href="http://www.wiscwx.com/cr/intro.html" target="_blank">Introduction</a></font></td>
<td align="right"><font style="font-family: <? echo $ff; ?>; font-size: 9px;">
<a href="?dispm=<? echo $swtnu; ?>">Switch to <? echo $swt; ?></a></font></td>
</tr></table>
<h5 style="font-family: <? echo $ff; ?>;"><? echo $fter; ?></h5>
Living 'Off Grid" in Central Florida. Pics at k4kmg.com

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #180 on: July 22, 2011, 12:00:01 PM »
Just like mine.  :?:

Offline K4KMG

  • Contributor
  • ***
  • Posts: 106
    • K4KMG.com
Re: How to Run US Animated Radar on Google Maps
« Reply #181 on: July 22, 2011, 12:05:32 PM »
I'm assuming you've been here?

http://www.wiscwx.com/jordan/crrdr/index.html

In your crrdr.php file - is this correct? $crdat = @fopen( "ftp://tgftp.nws.noaa.gov/SL.us008001/DF.of/DC.radar/DS.p37cr/SI.".$rregi.$radar."/sn.last" , "r" ) or die($lerro); I believe this is where the data is called from?

Living 'Off Grid" in Central Florida. Pics at k4kmg.com

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #182 on: July 22, 2011, 12:09:07 PM »
Yep, read all the instructions, and that line is exactly the same in my file.

That's what I don't get, it was a very straight forward install.

Offline K4KMG

  • Contributor
  • ***
  • Posts: 106
    • K4KMG.com
Re: How to Run US Animated Radar on Google Maps
« Reply #183 on: July 22, 2011, 12:25:31 PM »
Got this in you CR.php file?

<?php require("table.php"); ?>
Living 'Off Grid" in Central Florida. Pics at k4kmg.com

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #184 on: July 22, 2011, 12:27:49 PM »
In which file?

Offline K4KMG

  • Contributor
  • ***
  • Posts: 106
    • K4KMG.com
Re: How to Run US Animated Radar on Google Maps
« Reply #185 on: July 22, 2011, 12:28:45 PM »
Composite Reflectivity

Would be your ffc_test.php
« Last Edit: July 22, 2011, 12:31:21 PM by K4KMG »
Living 'Off Grid" in Central Florida. Pics at k4kmg.com

Offline hdmax

  • Member
  • *
  • Posts: 29
    • Wunderground, my back yard
Re: How to Run US Animated Radar on Google Maps
« Reply #186 on: July 24, 2011, 05:53:28 PM »
I don't know why mine isn't working. I put the Lat./Lon. in, the google code, and the 3 letter radar id, and all I get on my pc is a stagnent map. However, I don't get anything at all on my website. sixmileturn-weather.com
 I am running an Davis Vantage Pro2 with Cumulus 1.9.2 build 1005

Code: [Select]
<html>

<head>

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;ABQIAAAABVexnRpPekhoVpCGaDDoKxTxJRZepZpOVZW-zHU13RTD2wxa4hQCnUWyLpLbfyiNWdf1rv5eog7IMg" type="text/javascript">
</script>

<script src="http://www.sixmileturn-weather.com/current/misc/google-maps/dax/radar.js"></script>

<script src="http://www.sixmileturn-weather.com/current/misc/google-maps/dax/ridge.js"></script>



<script>



var Clock ;

var Cycle ;

var Google;

var Helper;



var Last=  0;

var Skew=  0;

var Wrap= 10;

var Idle=100;

var Back=500;



var Radar=[];



var Ridge=["ZZV,IND"];



var Product="NCR";



function Pause(pause)

{

Idle=pause*10;

Back=pause*50;

}



function Opacity(opacity)

{

for (var i=0;Ridge[i];i++)

{

Radar[i].opacity(opacity);

}

}



function Loop()

{

for (var i=0;Ridge[i];i++)

{

Helper.childNodes[i].childNodes[0].data=Radar[i].select(Last);

}



Last=(Last+1)%Wrap;



Clock=clearTimeout(Clock);



Clock=setTimeout("Loop()",Last ? Idle : Back);

}



function Feed()

{

var stub="http://www.srh.noaa.gov/ridge2/JSON_generator.php?callback=CallBack&frames="+Wrap;



for (var i=0;Ridge[i];i++)

{

Radar[i].feed(stub+"&rid="+Ridge[i]+"&product="+Product);

}



Cycle=clearTimeout(Cycle);



Cycle=setTimeout("Feed()",150000);

}



function CallBack(callback)

{

var stub="http://www.srh.noaa.gov/";



var pair;



var reload=[];



for (var i=0;callback.directory[i];i++)

{

pair=callback.directory[i].match(/([A-Z][A-Z][A-Z]|[A-Z][0-9][A-Z])/g);



reload[i]=stub+callback.directory[i];

}



for (var i=0;Ridge[i];i++)

{

if (pair) if (pair[0]==Product) if (pair[1]==Ridge[i]) Radar[i].reload(reload);

}

}



function Load()

{

Google=document.getElementById("google");



Google.style.width ="640px";

Google.style.height="640px";



GDraggableObject.setDraggableCursor("pointer");

GDraggableObject.setDraggingCursor ("pointer");



Google=new GMap2(Google);

Google.setCenter (new GLatLng(40.1031,-82.1216),7, G_PHYSICAL_MAP);

        Google.setUIToDefault();

Helper=document.getElementById("helper");




for (var i=0;Ridge[i];i++)

{

Helper.appendChild(document.createElement("DIV"));



Helper.childNodes[i].appendChild(document.createTextNode(""));



Radar[i]=new FrameAnimationLayerOverlay({bbox:BBox(Ridge[i],Product),size:{x:750,y:750},last:Last,skew:Skew,wrap:Wrap,name:Ridge[i]+"_"+Product});



Google.addOverlay(Radar[i]);

}



Feed();

Loop();
}



function Free()

{

GUnload();

}



</script>



</head>

<body onload="Load();" onunload="Free();">

<br/><br/><br/><br/>


<div style="text-indent:0px; width:100%; height:100%; font-family:arial; font-size:14px; font-weight:normal; overflow:hidden;" align="center">



<div id="google"></div>

<div id="helper"></div>

<div>

<input type="radio" name="pause" onclick="Pause( 5);"> Extra Fast

<input type="radio" name="pause" onclick="Pause( 8);"> Fast

<input type="radio" name="pause" onclick="Pause(12);"> Medium

<input type="radio" name="pause" onclick="Pause(18);"> Slow

<input type="radio" name="pause" onclick="Pause(25);"> Extra Slow


<input type="radio" name="pause" onclick="Pause( 2000);"> Pause

</div>

<div>Opacity

<input type="radio" name="opacity" onclick="Opacity(0.25);">  25%

<input type="radio" name="opacity" onclick="Opacity(0.50);">  50%

<input type="radio" name="opacity" onclick="Opacity(0.75);">  75%

<input type="radio" name="opacity" onclick="Opacity(1.00);"> 100%

</div>

</div>

</body>

</html>


« Last Edit: July 24, 2011, 06:19:24 PM by hdmax »

Offline ELDoradoWx

  • El Dorado Weather
  • Senior Contributor
  • ****
  • Posts: 298
  • Gentoo X = Complete_Control
    • El Dorado Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #187 on: July 26, 2011, 04:55:45 PM »

The path to your radar.js and ridge.js is broken. No such files exist there..

Also, I have never seen a radar station named "ZZV". You will need to remove it.

Besides ZZV not being a valid radar station, another issue is the missing quotation marks in the below line.

You have: var Ridge=["ZZV,IND"];

It should look like this if you use more than 1 station: var Ridge=["ZZV","IND"];

You should notice that each of the stations call letters have a beginning and ending quotation mark.

Change it to this: var Ridge=["IND"]; Then see it you can get the one station working first. If it works, then go ahead and add more stations..
« Last Edit: July 26, 2011, 05:03:47 PM by ELDoradoWx »
-Danny
-root is everything

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2429
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #188 on: July 31, 2011, 03:38:26 AM »
If one can't stand the ugly, worthless mess that ground clutter makes out of your google radar map, then I suggest using this highly interactive weather map, instead:

http://www.intellicast.com/Local/WxMap.aspx

The full size page is even more cool at http://www.intellicast.com/Local/WxMapFull.aspx  So now the hopelessly messy google radar map at http://stillwaterweather.com/ridge.html has been dropped from my site as a link.
« Last Edit: July 31, 2011, 03:48:18 AM by Bunty »

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2429
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #189 on: September 07, 2011, 02:31:20 PM »
I've read there's a down side to radar maps like by Intellicast.  You may be  missing some detail as a result of a much cleaner look.  A map like that typically has any returns under 20 dbz filtered out. So this is going to remove ability to see features like fronts and outflow boundaries. So a messy looking map with ground clutter  may be more valuable than one may think.

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline linuxfreak

  • Hamilton Central Mountain Weather
  • Senior Contributor
  • ****
  • Posts: 188
  • Wink, wink!
    • Hamilton Central Mountain Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #190 on: November 28, 2011, 11:00:12 PM »
Well, for some reason the Ridge radar stopped working tonight, my site isn't the only one having no radar images. Seems the returned images are just blank, they have the GIF89 header and some data, just not enough for an image, for example:

Code: [Select]
Location:    http://www.srh.noaa.gov/ridge/RadarImg/NCR/BUF/BUF_20111128_2134_NCR.gif
Type:         GIF Image
Size:          0.93 KB (954 bytes)
Dimensions: 600px × 550px

Real strange, was working this afternoon. :???:

George

George
Davis VP2/FARS, VVP, WD, WL, WSWin, Cumulus, NexStorm, StrikeStar, NSLog, XPort(GPS), WASP2, DigitalAtmosphere, ScannerCast(WUradio), Intel Atom N330 dual-core, 2Gig ram, Windows XP Home SP3  #-o
CWOP - DW3112, PWS & WU - IONHAMIL2, AWEKAS - 5112, COWN, WML - WD01901

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #191 on: November 29, 2011, 09:44:01 AM »
Could have been down yesterday. http://www.daculaweather.com/nexrad_status.php

Offline wmleler

  • Member
  • *
  • Posts: 17
Re: How to Run US Animated Radar on Google Maps
« Reply #192 on: January 03, 2012, 06:42:40 PM »
This just stopped working today.  I looked on the websites of some of the people who have posted here, and it looks like it is not working for anyone.

The problem appears to be the web server www.srh.noaa.gov.  The radar images on this site are either missing or blank. In addition, the http://www.srh.noaa.gov/ridge2/JSON_generator.php is generating bad file names.

The radar images on radar.weather.gov are still good, but there doesn't seem to be a JSON_generator.php program that can tell you the image file names.

Is this a temporary problem with www.srh.noaa.gov?  Or are we SOL?

Offline wmleler

  • Member
  • *
  • Posts: 17
Re: How to Run US Animated Radar on Google Maps
« Reply #193 on: January 03, 2012, 06:47:02 PM »
By the way, a few days ago I finished rewriting this code to run on Google Maps V3, and this week I was going to rewrite it for Leaflet (open source map library from Cloudmade).  But now it doesn't work.  I sure hope the problem is temporary.

The only issue is getting the file names for the animation frames of the weather radar.  If anyone knows another way to do this (that doesn't violate cross-domain restrictions) please let me know. I'd rather not use Flash, either.  Looking for a JavaScript solution.

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #194 on: January 03, 2012, 07:23:12 PM »
Yep, sure enough, not working. Glad you pointed that out.

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #195 on: January 03, 2012, 08:22:48 PM »
By the way, a few days ago I finished rewriting this code to run on Google Maps V3, and this week I was going to rewrite it for Leaflet (open source map library from Cloudmade).  But now it doesn't work.  I sure hope the problem is temporary.

The only issue is getting the file names for the animation frames of the weather radar.  If anyone knows another way to do this (that doesn't violate cross-domain restrictions) please let me know. I'd rather not use Flash, either.  Looking for a JavaScript solution.
All the Federal Government stuff is public domain, use it as you wish. I sent an email to the webmaster to see what the problem is.

Offline wmleler

  • Member
  • *
  • Posts: 17
Re: How to Run US Animated Radar on Google Maps
« Reply #196 on: January 04, 2012, 04:30:42 AM »
I wrote something to get around the problem -- a replacement for JSON_generator.php (attached).  It is pretty short, but it uses a PHP library called EasyWebFetch.php, which you can find about halfway down the page at http://nashruddin.com/fetching-a-web-page-from-php-code.html (under "The Downloads", just before the comments).

You will have to put these two PHP files on a server somewhere. You'll have to modify ElDoradoWx's scripts to call this service (where ever you put JSON_generator.php) rather than http://www.srh.noaa.gov/ridge2/JSON_generator.php (which doesn't work any more).  Also make sure you fetch the images from http://radar.weather.gov instead of http://www.srh.noaa.gov

My app is working again with these changes.  Good luck!

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #197 on: January 04, 2012, 06:06:58 AM »
Looks like I have a lot of work to do! :grin:

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: How to Run US Animated Radar on Google Maps
« Reply #198 on: January 04, 2012, 12:10:56 PM »
Got this back from the NWS:
-----------------------------
From: Corey Pieper [mailto:corey.pieper@noaa.gov]
Sent: Wednesday, January 04, 2012 11:04 AM
To: Dennis Cain
Subject: Fwd: FW: JSON Generator
 
Dennis,
 
With the move to RIDGE 2, these services are pretty fluid right now. Go to this feed, which points to the new RIDGE2 versions of the images: http://www.srh.noaa.gov/ridge2/ajax/radar_paths.php?rid=FWS&pid=N0Q
 
...with a warning, that this URL will also change upon the move of RIDGE 2 to NIDS - though I'm not certain what it will be at this time.
 
Corey
« Last Edit: January 04, 2012, 12:57:58 PM by DaculaWeather »

Offline wmleler

  • Member
  • *
  • Posts: 17
Re: How to Run US Animated Radar on Google Maps
« Reply #199 on: January 04, 2012, 10:41:57 PM »
Thanks Dennis!  Is there some way to keep informed about these changes?  For example, would it be ok if I contacted Corey?