Syndicating
This chapter explains how to use the GeoRSS format (http://georss.org) to encode spatial information as part of a syndicated feed of information. GeoRSS may be used to append spatial information encoded in XML format to any other XML document. This makes it a uesful way of "geotagging" items in a syndicated feed of information, as in the following examples:
- The location of an item of news.
- The roads affected by a traffic accident, and the proposed alternative route.
- The venue at which an event is being held.
Structure of a GeoRSS Feed
In this chapter, I'll show you how to create a feed of spatial information from SQL Server 2008, using the GML-encoding as part of an RSS feed, such as shown in the following example:
<rss xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" version="2.0"> <channel> <title>SQL Server GeoRSS Feed</title> <description>This feed contains information about some fictional properties for sale in order to demonstrate how to syndicate spatial data using the GeoRSS format. </description> <link>http://www.beginningspatial.com</link> <pubDate>Wed, 1 Oct 2008</pubDate> <item> <title>Pilgrims Way, Chew Stoke, Somerset</title> <description>Grade II Listed former Rectory, with magnificent architectural features and stunning gardens. £750000.00</description> <link>http://www.example.com/1</link> <pubDate>2008-09-01T17:00:00Z</pubDate> <georss:where> <gml:Point> <gml:pos>51.35494 -2.635765</gml:pos> </gml:Point> </georss:where> </item> <item> ... </item </channel> </rss>
Consuming a GeoRSS Feed
Once you've created a feed of spatial information from SQL Server, I'll then show you how you can consume that feed, displaying the items contained within it using Virtual Earth or Google Maps, as shown below:
Virtual Earth |
Google Maps |


Comments
Post new comment