IEM RadMap API
Please note: This mapping service is
provided without warranty. Please do not use this on a high traffic website.
If necessary, this application may be disabled to keep the IEM web farm from
melting! This API is intended to support local scripts to generate timelapse
movies.
The "radmap" application dynamically generates a PNG image based on a set
of HTTP provided parameters. This page documents these parameters. Please note
that the API presented here may change in the future.
Basic HTML example:
<img src="http://mesonet.agron.iastate.edu/GIS/radmap.php?layers[]=nexrad§or=conus&ts=200806071000" />
HTTP GET Parameters
&layers[]=...&layers[]=...&...
Layer(s) to draw in the map. Here is a list of available layers:
- uscountines - CONUS Counties
- nexrad - CONUS Nexrad Base Reflectivity Composite
- watch_by_county - Convective Watch-by-County
- watches - Polygon SPC Watch boundaries
- cbw - County/Zone based Watch/Warning/Advisories
- sbw - Storm based Watch/Warning/Advisories
- county_warnings - County based Warnings
- lsrs - Local Storm Reports
- roads - Iowa Winter Road Conditions
- legend - Include Legend on the Map
§or=...
Predefined areal extent to use for the map. Current sectors are:
- iem - Iowa
- lot - Chicago
- ict - Wichita, Kansas
- sd - South Dakota
- hun - Northern Alabama
- conus - CONUS
- texas - Texas
&width=640&height=480
Width and height of the map in pixels.
&vtec=...
VTEC identification string of a specific product. The result is a map
centered on this product with a timestamp set to product issuance. An
example VTEC string is: "2008.DMX.TO.W.0048".
&pid=...
This is for the specific example of offices who issue geometries with
their SPS statements. An example string is: "200903082123-KGRR-WWUS83-SPSGRR"
&bbox=xmin,ymin,xmax,ymax
Bounding box of the map (typically a latitude and longitude box). An example
would be "-95.4,40.1,-89.4,44.5".
&ts=YYYYMMDDHHII
Timestamp in GMT for which the map is valid for. For example, 6:45 GMT on
5 Jun 2005 would be "200506050645".
&title=....
A customized title to place on the map.
Example Python client script
Here is an example python script that will call this service and locally
generate a folder of images that can then be converted into a movie.
#!/usr/bin/env python
import datetime, os
# Generate series of images between 0z and 12z on the 3rd of August
now = datetime.datetime(2008,8,3,0,0)
ets = datetime.datetime(2008,8,3,12,0)
interval = datetime.timedelta(minutes=5)
baseuri = "http://mesonet.agron.iastate.edu/GIS/radmap.php?"
baseuri += "width=800&height=600&bbox=-95,42.5,-89,45.5"
baseuri += "&layers[]=uscounties&layers[]=nexrad&layers[]=sbw"
baseuri += "&layers[]=watch_by_county"
# Change into a frames folder
os.chdir("frames")
stepi = 0
while (now < ets):
url = "%s&ts=%s" % (baseuri, now.strftime("%Y%m%d%H%M"))
cmd = "wget -q -O %05i.png '%s'" % (stepi, url )
os.system(cmd)
stepi += 1
now += interval
os.system("ffmpeg -y -i %05d.png -b 2000k out.mp4")
Change Log
- 10 Mar 2009: Initial release