A Mobile App for Radar Data

During my internship last year with Unidata, I developed an Android version of a netCDF Subset Service form. Coming back this year, I wanted to expand my endeavors in mobile development by writing an application that works on all mobile platforms. To do this, I decided to use Apache Cordova because it takes a JavaScript/HTML file and packages it as a native application for any mobile platform. The product of choice this year was Unidata's radar data as it seemed to be a product well suited for mobile users.

Radar composite
Composite Radar Image

The original idea was to take the radar site files and display the data on a Google map. While the Google Maps JavaScript API worked nicely with Cordova, there were no technologies that I could find that could draw the number of pixels in a radar file without crashing or seriously lagging on a mobile device. This led me to begin looking into a tiled service and I began to work with Unidata's radar composites. These worked nicely because they only returned the radar for the area of interest and can produce a nice KMZ file that can be fed to Google Maps.

Description
Radar data on a Google map display.

In order to display the file on Google Maps though, the file must first be hosted on a web server. In order to avoid writing a program to maintain a web server, I instead used the Dropbox API to allow each user to use their personal Dropbox accounts as their own web server. Using this, the KMZ file is downloaded from THREDDS, uploaded to the user's personal Dropbox, and then fed to Google Maps to be displayed on their phone.

Animating the radar images turned out to be somewhat tricky because the animated KMZ files produced by THREDDS are dependent on time and while time can be toggled in Google Earth, I could not find how to do so in Google Maps. Instead, I made multiple requests for individual radar files and to animate them I toggled their visibilities on and off. Unfortunately, this is very slow and probably can be sped up in future work.

Other possibilities on where this application can expand include other radar products and model data. The code for this project is available on GitHub. I encourage you to leave me a comment below with your thoughts or become a contributor to the GitHub branch.

Posted by: unidatanews
Jul 31, 2014

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Article Category
Article type
Developer Blog