Hosting A GeoRSS Feed

by Gong Liu April 29, 2009 18:17

A Brief Description of RSS 

RSS (Really Simple Syndication) is a Web content syndication format. It's a dialect of XML. All RSS files must conform to the XML 1.0 specification. RSS is standardized by RSS Advisory Board. The current RSS version is 2.0.1.

The following diagram illustrates how RSS works.

     How RSS Works

On the server side there must be a RSS document (which is called a "feed", "web feed", or "channel"). It usually has the name rss.xml, but it can be any name you choose. It includes one or more items, each of which describes a document (an article, a piece of news, a blog entry, etc.) on the website in such properties as title, summary, link to the document, authorship, publication date, etc. As new documents are added to the website, the RSS document is updated accordingly. The following is a sample RSS document.

sample RSS document

On the client side there is a RSS reader or aggregator, which is a piece of software that understands RSS format. The RSS reader can be a stand-alone application or a built-in feature of a web browser such as IE 7.0+ or Firefox. A user subscribes a RSS feed by telling the reader the URL of the feed. This is usually done by clicking a feed subscription link identified by the icon RSS or RSS. The user may subscribes multiple feeds from different websites. The RSS reader checks the user's subscribed feeds regularly for updates, and downloads them if any. When reading the feeds, the user has a number of options. He can choose to display all items or unread items only. He can sort items by date, title or author. He can filter items by categories.

In short, the main benefit of RSS is that a user can automatically get timely updates of multiple websites and view them in a centralized place.

From RSS to GeoRSS

GeoRSS is an extension of regular RSS. It adds geographic information, such as points, lines and polygons, to items. For example, if an item is about a set of photos you took on a trip and the locations of the photos are important, then you can add a latitude/longitude point to each photo. Or if an item is about a hiking trail and you want to show it on a map, then you need to add a geographic line to the item. Since GeoRSS is all about locations, it's only logical to show its content on an online map. Fortunately, all popular online maps, such as Google Maps, Virtual Earth and Yahoo Maps, support GeoRSS.    

The following diagram shows how GeoRSS works:

    How GeoRSS Works

Like RSS you will need a RSS document (rss.xml) on your website. However, at least some items in the rss.xml file must point to GeoRSS documents (e.g. Trip1.xml, Trip2.xml, etc), instead of regular HTML documents. If you use Google Maps to display geographic content, an item link will have this format:

This tells Google Maps where the GeoRSS document is on your site for a particular item.

The flow of communications among the client, your website and Google Maps is as follows:

  1. The client requests the rss.xml file
  2. Your website returns the rss.xml file
  3. When the client clicks an item link, he is taken to Google Maps with the URL of corresponding GeoRSS document as a query string
  4. Google Maps fetches the GeoRSS document from your website
  5. Google Maps draws the geographic content on a map and returns it to the client.

For performance purpose, Google Maps will cache your feed and update the cache approximately once an hour. So if you change anything in your GeoRSS document, don't expect it reflectes on the map right away.

Currently, there are two primary GeoRSS encoding methods, GeoRSS GML and GeoRSS Simple. Please refer to for more information. If your feed only has a few points, you can probably create your GeoRSS document by hand. But if there are a lot of points involved, you will definitely need a GPS logger of some kind to record the points, and a software program to write the points to a GeoRSS document. In the following example. I used Pharos GPS Logger to record location data and generate GeoRSS (Simple) documents.  

An Example 

Let's say you have a website Fun*tastic Trips, dedicated to various trips you made, hiking trips, biking trips, boating trips, etc. Since the site is going to be updated frequently with new trips, you want to provide a GeoRSS feed for your site users. A user can subscribe the GeoRSS feed by clicking the link identified by the iconGeoRSS. The rss.xml file that the subscription link points to may look like this:

sample RSS document

In this particular rss.xml file, there are only two items. One item is a simple annocement (non-GeoRSS). The other item is about a trip and photos taken during the trip. The photo locations and trip route are described in the GeoRSS document trips0711011644-0711021015.xml, a portion of which is shown below:

sample GeoRSS document

Like a RSS document, a GeoRSS document also consists of one or more items. In this particular GeoRSS document, the first item represents the trip route. The latitude/longitude points that make up the route are enclosed in the georss:line tag. The rest of items represent photos taken during the trip. Each photo's location is given by the georss:point tag. The description tag of a photo item contains a HTML snip that shows thumbnail, caption, date/time, etc. of the photo. In Google Maps, each photo item is shown as a balloon icon and if the icon is clicked, a balloon window pops up showing the HTML snip in the description tag. 

Whenever you have a new trip, you need to do two things:

  1. Copy its GeoRSS document and associated files such as photos to your site (e.g. at
  2. Add a new item to the rss.xml file with the item link pointing to the new GeoRSS document via Google Maps (like so ).

Subscribing and configuring a GeoRSS feed have no difference from subscribing and configuring a RSS feed. This article show how to subscribe and configure a RSS feed using the RSS reader built in IE 7.0+.

Viewing a GeoRSS feed is also as easy as viewing a RSS feed. The following set of screenshots illustrates the process for IE 7.0 RSS reader.

select GeoRSS feed
1) Select Fun*tastic Trips GeoRSS feed from a list of feeds subscribed

select GeoRSS item
2) Select a GeoRSS item to view on Google Maps (click the green arrow)

view GeoRSS feed on Google Maps
3) Feed content is shown on Google Maps. Notice the URL of the GeoRSS document in the search box.

Links and Downloads from the Example 


A seasoned computer professional. A tofu culture evangelist...
more >>

Tag Cloud


<<  April 2017  >>

View posts in large calendar
Copyright © 2008-2011 Gong Liu. All rights reserved. | credits | contact me
The content on this site represents my own personal opinions, and does not reflect those of my employer in any way.