September 14

Aeris Android SDK Tropical API Data

The tropics are busy and so are the teams at AerisWeather! Last month’s Aeris Android SDK update added new tropical cyclone imagery from the Aeris Mapping Platform (AMP). Today we’re excited to announce that we’re putting even more tropical cyclone information into your hands (and apps). Version 2.5.0 expands the Aeris Android SDK tropical API support for the Aeris API Tropical Cyclone endpoint to include point and polygon data!

The Tropical Cyclone Endpoint

The Aeris API provides rich data support for active global tropical systems. You can get all the details in the full rundown of the cool new Tropical Cyclones endpoint blog. With v2.5.0 of the Aeris Android SDK, we’ve baked in the usual support to help get that tropical data into your apps.

Here’s an example using the Android SDK tropical API integration to query the Aeris API tropical cyclones endpoint:

Assuming there is at least one active tropical storm out there (and if it’s July, Aug or Sept, that’s a pretty good bet), we’ve got storm data!

Okay, so we can see how easy it is to get information about active tropical storms using the Aeris API Tropical Cyclone endpoint. But everybody knows that a picture is worth a thousand API queries, so let’s take a look at bringing that data to life on a map.

Tropical Cyclone Map Layers

Android SDK Tropical API Map

The updated Android SDK tropical API components give us a streamlined way to access the different sets of map data provided by the Aeris API Tropical Cyclones endpoint.

For point data, we have a few nifty bits of data to plot. Track data provide points along the storm’s historical path. Forecast point data gives us coordinates indicating the storm’s future path. At each point, we combine the location data (lat, lon) with the relevant info about the storm like wind speed and category. Using this data with a click event allows for an interactive user experience, like tapping a point along the storm track to reveal specific storm details.

Polygon data for tropical storms provide a geopoly coordinate set specifying the error cone. This region indicates the probable area where the storm is forecast to go. Plotted on a map with the track and forecast point data, we get a really cool and informative view of the storm.

 

Okay, that sounds great – so how do I take advantage of the Android SDK tropical API integration? Here’s an example showing how to request point data from the Aeris API. Once you’ve initialized your map, it’s a simple one-liner:

Adding the error cone polygons for tropical storms is super easy too:

Refining the Android SDK Tropical API Results

So, now we’ve seen some simple examples adding the new tropical layers to your map. The examples above give you point and polygon data with the default parameters for the active storms. However, maybe you want to tweak the results a bit. Or you might want to add a custom UI, allowing the user to choose a specific storm, etc. With this in mind, we’ll need to go a little further and dig into some options.

To drill down and refine the results, check out this example:

The code above is straight from the map library, just behind the curtain providing the results in the examples above. Notice that we limited the number of storms in our result to 2. Next, we see that we’ve asked the API to sort the results with the most recent listed first. Using the ParameterBuilder class in the SDK, we can tweak the results to exactly what we need.

For specifics regarding the allowed parameters, filters, actions, etc. for the Tropical Cyclones endpoint, take a look at the endpoint docs.

To get more information on the ParameterBuilder class, check out the Aeris Android SDK docs.

Looking for more example code using the Tropical Cyclones point and polygon data? Download the Aeris Demo project from GitHub and load it up in Android Studio. Expand the core and map libraries under the Project view. Now you can browse through the classes and check out the request and response handling code we’re using.

Android SDK Tropical API Android Studio

What Will You Do with the Aeris Android SDK Tropical API Integration?

We hope you enjoy the new version and can’t wait to see what you make next!

Not currently an AerisWeather user? Check out our free developer trial and start using the Android SDK today!

Resources

Aeris Android SDK Docs

GitHub Project Page

Aeris API Docs

Aeris AMP Docs

 

Happy Coding!

The Aeris Android Team

Android Corner Wave

 

Share this post:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.