Vishful thinking…

Conceptualizing AtomPub for Map services

Posted in Uncategorized by viswaug on December 8, 2008

I have written about some of the advantages that a REST API can bring to exposing GIS data. This is not just for delivering map images but also for delivering and managing vector data. We have been building a RESTful API to not only expose vector GIS data, but to perform all of the CRUD operations on the data as required. Since most of our mapping applications are built using the ESRI JS API, the REST API makes it a breeze to access those functionalities through URL endpoints.

Not to revisit the topic again but the idea behind REST is to use HTTP as an ‘application protocol’ rather than as a transport protocol like SOAP web services do. One protocol that uses HTTP the way it is meant to be used is the AtomPub protocol. I am not going to go into details about the AtomPub protocol here since there a lot of documentation available online that do a good job of explaining the AtomPub protocol. But in brief terms,

The Atom Publishing Protocol is an application-level protocol for publishing and editing Web Resources using HTTP [RFC2616] and XML 1.0 [REC-xml].

AtomPub is both a format and a protocol. And I think that the AtomPub is a natural way to expose data especially also GIS data. I am going to go over how in my opinion GIS data exposed as map services seamlessly falls into the AtomPub data container structure. The figure below illustrates a simplified data container structure in AtomPub.


As you can see from the above figure, an AtomPub service document contains a list of ‘Workspaces’ which in turn contains a list of ‘Collections’. The ‘Collections’ are represented by Atom Feed documents. The Atom Feed document contain a list of ‘Entrys’. In my opinion, here is how the ‘Service Document’ in the AtomPub protocol relates to a map service. (I am only referring to ESRI Map services below).

Service Document – The Map Service itself The entry point that describes the location and capabilities of collections


Workspace – Data Frames or Group Layers A logical grouping of collections


Collection/Atom Feeds – Feature Layers A Resource that contains a set of Member Resources. Collections are represented as Atom Feeds.


Entry – Feature – Represents an individual piece of content/Data


Categories Document/Categories Element – Feature Type – Provides metadata to describe an Atom entry. Categories Document describe Categories that are allowed in collections.


The AtomPub ‘Category’ element can also be used to represent feature types like ‘LinearRing’, ‘Polygon’, ‘LineString’, ‘MultiLineString’, ‘MultiPoint’ and be attached to Atom entries to provide metadata. They can also be used to represent the domain entity represented by the Feature Layer like National Forest etc…


Service Document Sample:

<?xml version=“1.0” encoding=‘utf-8’?>

<service xmlns=; xmlns:atom=;>



    <collection href=; >

      <atom:title>National Highways</atom:title>

      <categories href=; />


    <collection href=; >







    <atom:title>Water Bodies</atom:title>

    <collection href=; >



      <categories fixed=“yes”>

        <atom:category scheme=; term=“polygon” />

        <atom:category scheme=; term=“Lakes” />






Atom Feed Document:

<?xml version=“1.0” encoding=“utf-8”?>

<feed xmlns=;>


  <title>Example Feed</title>

  <subtitle>A subtitle.</subtitle>

  <link href=; rel=“self”/>

  <link href=;/>



    <name>John Doe</name>






    <title>Atom-Powered Robots Run Amok</title>

    <link href=;/>



    <summary>Some text.</summary>





Categories Document:

<?xml version=“1.0” ?>

<app:categories xmlns:app=; xmlns:atom=; fixed=“yes” scheme=;>

  <atom:category term=“animal” />

  <atom:category term=“vegetable” />

  <atom:category term=“mineral” />



The above is just my take on how the AtomPub elements can relate to map services. I think this is the next logical step in making map services more resource oriented and will allow for dynamic discoverability and ease in application development. ESRI map services already have the concept of a service document that can be accessed at the links below.

Supporting the AtomPub output format for that service document should be pretty simple.