HOW TO: Creating radar loops
Posted: Sun Jul 24, 2005 6:07 am
Digital Atmosphere does not have an animator built in yet, but you can do it in an automated manner like this.
Write a batch file in MS-DOS containing these commands.
(be careful, there should be only six lines above; your browser may have word-wrapped them, especially the last line)
The first composite command gives me a better "merge" of radar data with the basemap. The file basemap.gif contains only the basemap, and baseradar.gif contains only the latest radar (with the basemap blanked before drawing echoes). The output is written to radar.gif. Now come four copy commands. This shifts all frames back one slot, with frame0.gif being the oldest and frame3.gif being the newest. Finally comes the final convert command, which builds the radar animation and saves it to radarloop.gif. Ouila!
Of course, make sure Digital Atmosphere is writing out the baseradar.gif file. You can also delete the first convert line and just have it write radar.gif. Be sure it's on a script called every so often, and by the time you execute this batch four times you'll have a full radar loop.
The convert command requires the freeware ImageMagick kit, available at:
http://www.imagemagick.org/script/index.php
But lucky for you, I've thinned out the mess of distributables to just a dozen key files, which you can get at:
http://www.weathergraphics.com/dl/convert.zip
Unzip these to the SAME directory where you will be running the batch file (or put in their own directory and change the Windows path in your system setup to point to that directory).
The ImageMagick library is quite powerful, and there's no limit to what it can do with a good batch file. With the radar upload hack I posted earlier, you can put animated radar on your server quite easily... running your own Weathertap site.
Tim
Write a batch file in MS-DOS containing these commands.
Code: Select all
composite -compose xor -dissolve 50 basemap.gif baseradar.gif gif:radar.gif
copy frame1.gif frame0.gif
copy frame2.gif frame1.gif
copy frame3.gif frame2.gif
copy radar.gif frame3.gif
convert -delay 50 frame0.gif -delay 50 frame1.gif -delay 50 frame2.gif -delay 200 frame3.gif -loop 0 radarloop.gif
The first composite command gives me a better "merge" of radar data with the basemap. The file basemap.gif contains only the basemap, and baseradar.gif contains only the latest radar (with the basemap blanked before drawing echoes). The output is written to radar.gif. Now come four copy commands. This shifts all frames back one slot, with frame0.gif being the oldest and frame3.gif being the newest. Finally comes the final convert command, which builds the radar animation and saves it to radarloop.gif. Ouila!
Of course, make sure Digital Atmosphere is writing out the baseradar.gif file. You can also delete the first convert line and just have it write radar.gif. Be sure it's on a script called every so often, and by the time you execute this batch four times you'll have a full radar loop.
The convert command requires the freeware ImageMagick kit, available at:
http://www.imagemagick.org/script/index.php
But lucky for you, I've thinned out the mess of distributables to just a dozen key files, which you can get at:
http://www.weathergraphics.com/dl/convert.zip
Unzip these to the SAME directory where you will be running the batch file (or put in their own directory and change the Windows path in your system setup to point to that directory).
The ImageMagick library is quite powerful, and there's no limit to what it can do with a good batch file. With the radar upload hack I posted earlier, you can put animated radar on your server quite easily... running your own Weathertap site.
Tim