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 

Forrest Gump Route

by Gong Liu April 22, 2009 04:45

Forrest Gump is one of my favorite movie characters. In the movie, among other things, he was portrayed as a man with incredible running ability. He constantly ran from bullies at a young age. He became a member of the All-American team at college because he could outran all other football players. He ran under heavy artillery to save his fellow soldiers during Vietnam War. And of course most famously, he ran across America back to back several times over a span of three years to get over the heartbreak of Jenny's leaving him.

Putting aside the symbolism of all his runs, I always wondered how realistic his ultramarathon run was (even though it's a fiction, you don't want to show too many goofs in the movie), what route he had completed, and how he measured up with real ultramarathon runners. So I watched the movie a few more times (especially the running part) and did some detective work on the topic. I came up these clues:

  • Forrest started his three-year-long run from his front porch in Greenbow, AL in the early morning of July 5, 1976. Greenbow, AL is fictional but according to the Forrest Gump novel Forrest's hometown is Mobile, AL.
  • Forrest headed to the west first. He ran clear the ocean and reached the west coast at Santa Monica Pier, Santa Monica, CA. He then turned around, kept on going and got to another ocean (Atlantic Ocean) at Marshall Point Lighthouse, Marshall Point Road, Port Clyde, ME. He only stopped for sleeping, eating and going to bathroom (see this 0:00:46 2.97MB movie clip . Sorry for the squeezed frames. Still haven't figured out how to adjust the aspect ratio in Adobe Premiere).
  • This 0:00:27 1.10BM movie clip shows that Forrest had run for more than two years and was about to cross the Mississippi River for the 4th time at somewhere near St. Louis, MO. Most amazingly, the TV screen actually showed a sketch of his route up to then.
  • We don't know what route Forrest took after he crossed Mississippi River for the 4th time, but we do know where and when he ended his run. Based on this 0:01:26 3.77MB movie clip, he ended his run at Monument Valley, UT on US Highway 163 near UT and AZ border in the evening of September 19, 1979. He had run for 3 years 2 months 14 days and 16 hours.

Obviously, the single most important clue is the sketch of the route on the TV screen. The following image shows a enlarged and sharpened frame of it.


From this sketch we know in more than two years he ran across America about 3.5 times. For the remaining a year or less, he probably kept running to the east, hit the east coast somewhere, turned around and started his fifth crossing from east to west. We know he ended the run in Utah. The question is: did he stop in Utah before he finished the fifth crossing or after he finished the fifth crossing and started the sixth crossing from the west coast? My guess is that he didn't finish the fifth crossing because he probably didn't have enough time otherwise, if he kept the same pace throughout his journey. The last movie clip indicates that just before he stopped at Monument Valley, UT, he was running from east to west because when he said "I'm pretty tired. I think I'll go home now", he went to the opposit direction, his home direction.   

Based on the sketch and fair amount of guesswork, I came out the following list of cities that he might went through:

Cross1 Cross2 Cross3 Cross4 Cross5
Mobile, AL Santa Monica Pier, Santa Monica, CA Marshall Point Rd, Port Clyde, ME San Francisco, CA Norfolk, VA
Dallas, TX Las Vegas, NV Burlington, VT Reno, NV Pittsburgh, PA
Alamogordo, NM St George, UT Watertown, NY Salt Lake City, UT Indianapolis, IN
Phoenix, AZ Albuquerque, NM Cleveland, OH Fort Duchesne, UT Lincoln, NE
Santa Monica Pier, Santa Monica, CA Oklahoma City, OK Lansing, MI Craig, CO Denver, CO
  Knoxville, TN Chicago, IL Denver, CO US-163, UT
  Harrisonburg, VA Rapid City, SD St Louis, MO  
  Washington, DC Boise, ID Richmond, VA  
  New York, NY Portland, OR Norfolk, VA  
  Boston, MA San Francisco, CA    
  Marshall Point Rd, Port Clyde, ME      

Using these cities as waypoints I was finally able to generate the Forrest Gump Route and this is what it looks like in Virtual Earth (click it to see live demo):

Notice that the route I generated does not match the sketch very closely. This is because 1) My route is entirely based on drivable roads. The route engine used tends to pick fast, major highways, while Forrest might pick any roads, including less important country roads; 2) The sketch is not very realistic in areas such as big mountain ranges and deserts, where there are simply no roads, assuming he always ran on some kind of roads. 

The following table compares Forrest Gump with some famous distance runners:

Runner Forrest Gump Jesper Olsen Dean Kamazes Mark Covert Frank Giannino
1169.7 660 50 14600 46.3
15182 16156 1310 150000 3000
13.0 24.5 26.2 10.3 64.8
Description Forrest Gump ran across America back-to-back for five times in a span of three years (1976 - 1979), covered a distance of some 15,000 miles. Jesper Olsen of Denmark is the record holder of world run. He ran around the world in 22 months, on a route consisting of: London-Copenhagen-Moscow-Vladivostok-(air)-Niigata-Tokyo-(air)-Sydney-Perth-(air)-Los Angeles-Vancouver-New York-(air)-Shannon-Dublin-(air)-Liverpool-London. It covers a land distance of some 26000 km. Dean Kamazes, the ultramarathan man, was ranked by a TIME magazine poll as one the "Top 100 Influential People in the World." One of his recent endeavors was running 50 marathons, in all 50 states, in 50 consecutive days. Mark Covert, a teacher of Lancaster, CA, is the longest streaker in the U.S., having run at least one mile a day everyday since July 23, 1968, which is more than 40 years and still counting! His lifetime total distance is over 150,000 miles so far. The trans USA ultramarathon record is 46 days 8 hours 36 minutes (San Francisco, CA - New York, NY) set by Frank Giannino in 1980.

By comparison Forrest Gump was more like a streak runner than a marathoner. He ran at a moderate rate everyday for a relatively long period of time. Keep in mind that he did not run for setting record. He did it for clearing his mind as he explained "My mama always said 'you got to put the past behind you before you can move on' and I think that's my run was all about."

Now I have figured out the Forrest Gump Route. The next thing is to form a "Forrest Gump 5X-Country Running Association" and have some crazy runners try it out. Laughing

Technical Notes

  • The movie captions are created using Microsoft Movie Maker
  • The code for numbered pushpins is taken from Keith Kinnan's Blog
  • The route shape data is generated using Google Earth
  • The shape data reduction was discussed in this post


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.