Common Alerting Protocol (CAP) in the Indian Context

If you are interested in tracking weather alerts like I am, you should know about the Common Alerting Protocol (CAP). CAP is a standard XML formatted message that shares disaster/emergency alerts between creators, distributors, and receivers. For example, extreme rain alerts from IMD/Mausam (creator) to phones (receivers) through telecom service providers (distributors).

It is an ITU standard with two versions in force, CAP 1.1 and CAP 1.2. Without going into details, CAP 1.1 is simpler but lacks certain capabilities; CAP 1.2 builds on CAP 1.1, offering good support for digital signatures, precise geolocation, multilingual alerts, and improved extensibility. CAP 1.2 is backward and compatible with CAP 1.1. So, there is no real reason to be in CAP 1.1.

As you would have guessed, Indian agencies also have implemented a CAP-based alerting system. SACHET, a portal by the National Disaster Management Authority (NDMA), utilizes the Common Alerting Protocol (CAP) to send disaster alerts to citizens. It sources the alerts from various agencies, including IMD, NDMA, various SDMs, ESSO – Indian National Centre for Ocean Information Services. Forest Survey of India and Defence Geoinformatics Research Establishment (DGRE), etc

SACHET, a portal by the National Disaster Management Authority (NDMA) for near real-time dissemination of early warning using Common Alerting Protocol.

On SACHET, you can subscribe to alerts in various ways, including browser push notifications, Apps, SMS, and RSS feeds. Amongst these, I am interested in RSS feeds, as they are the most open format for me to receive alerts.

India CAP RSS Feeds
India CAP RSS Feeds

Currently, they are at the country and state ( Eg: Karnataka, Kerala) level and not local. Each item in the feed is a link to CAP 1.2 message XML. The author is typically the email address of the organization from which the message originates.

Though they use cap:polygon, they are only at district levels, as far as I know. Sometimes, alerts spread across multiple districts. So, you are only getting district-level alerts. I have a CAP message up on gist for reference.

CAP RSS Feed for Karnataka

I wanted a personal feed with a lat,lon, and map viewer. While attempting to do so, I encountered the following shortages.

  1. No location point( given a lat, lng ) specific feed. – Maybe we can aggreate all district-level warnings for a given point and make one.
  2. Feeds don’t have CORS enabled, so you can’t use them directly on your site without some kind of CORS proxy.
  3. The polygon in CAP 1.2 is (lat,lon) in WGS84 (EPSG:4326). – We must convert it into (lon, lat) to use it as a GeoJSON polygon.

I also found Alert Hub, an aggregator of CAP Feeds from around the world. They have one aggregated RSS feed for the world. They also have a map view of recent alerts from around the globe.

Interestingly, they have an XSL way of displaying the details of the CAP Message XML in the browser, including the map. I thought it was a terrific way to use XSL. I made a copy and uploaded it to GitHub for further study. You can view it here.

CAP Message XML with Style sheet

For now, I am working on a way to display recent alerts with a map on the page and a feed, given the latitude and longitude coordinates within India. It’s similar to my IMD alerts page but a bit more fancy with maps. Ping me if it interests you as well.

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.