RESTful GeoWeb学习手记(四):GeoRSS介绍之二

1799人阅读 评论(0) 收藏 举报

RESTful GeoWeb学习手记(三):GeoRSS介绍之二

粟卫民http://www.gisdev.cn/ http://blog.csdn.net/suen/ 日期:2007-9-27

本文内容汇编自Directions Magazine,纯为学习研究。如有不妥,请原文作者联系本文作者删除相关内容


Directions MagazineAdena Schutzberg写了一篇关于GeoRSS介绍的文章,很不错,为了方便国内读者访问,我就转载到下面。

Fun with GeoRSS
By Adena Schutzberg
(Jun 09, 2006)

Disclosure statement: I consult to the OGC, a current sponsor of GeoRSS.

First, RSS
If you know what RSS is, GeoRSS is a logical step forward. But, since many people only vaguely know of RSS, let's start there. RSS stands for Really Simple Syndication or Resource Description Framework (RDF) Site Summary or Rich Site Summary. None explains what it does very well. RSS is a way to publish information out to an application. It's commonly used to publish the latest blog entries to RSS aggregators/readers, tools used to read the data delivered in what's called an 揜SS feed.?The feed is delivered in Extensible Markup Language (XML) that's typically published automatically by a blog or other software. The RSS feed itself looks a lot like HTML, with tags and values associated with those tags.

How this all works is nice to know, but what you can do with RSS is far more interesting. Here's a very simple example of how we use RSS at Directions Media. Our blog, All Points Blog, publishes an RSS feed. (Have a look at it here.) We capture that feed and use it to populate the Blog area on the Directions Magazine homepage. Every time a new post appears at APB, the software behind our homepage learns of it via the RSS feed and posts it. Magic! It's not really magic, our programmers built it, but we editors love it since we don't have to worry about keeping our various sites in sync.

RSS and Geodata
The RSS feeds that Directions Media offers include text only since words are our stock in trade. But, what if you wanted to share content that was spatial in nature? How would you code it into the RSS feed? That's not exactly where GeoRSS came from, since the people who built it were trying to solve a slightly different, broader problem. Still, that's the question they ended up answering. GeoRSS adds a few (or more) tags (think of HTML type tags) to RSS that hold spatial data. That data is associated with the text, numbers and images that are published in the feed.

So, within a typical RSS feed, you might want to consider adding spatial information such as a weather forecast (e.g. the temperature in San Francisco will be 50 degrees with cloudy skies). With GeoRSS, you could include that information and the coordinates of San Francisco in a standard form. That last part, about a standard form, is important since it suggests that "some people" have agreed on standards. And, indeed, some people have. They are not a standards organization and you may never have heard of some of them, but they are people who were interested in solving this problem and put their heads together.

The Current State of GeoRSS
Here's what they came up with, so far. Alas, the current state of things includes three different but related ways to store spatial data:

  • A World Wide Web Consortium (W3C) version
  • A Simple GeoRSS
  • A GML or Pro GeoRSS
Each is a bit different (that's the wonderful thing about standards ?there are so many to choose from!) but none are yet a formal standard. They are just "out there" for folks to use. OGC was unable to provide a statement on the status of GeoRSS within that organization before press time.

So, what's the difference between these and how are they used? I'll keep this short since it's far more fun to play with these feeds than to understand their inner workings.

W3C Geo was first out of the gate, back in 2003. It's sometimes referred to as "geo:lat/geo:lon" since those are the names of the tags. W3C Geo supports just points. The current thinking is that all tools designed to work with GeoRSS should support all three versions. Here's what W3C Geo looks like:


Simple GeoRSS extends W3C Geo to include support not just for points, but lines, polygons, boxes and elevations. It's built on a profile (subset) of OGC's Geography Markup Language (GML) specifically chosen to make it easy for programmers to implement and for others to use. Simple GeoRSS lays down rules about which coordinate system is used: WGS84, latitude, longitude (in that order), using decimal degrees. It looks like this:

GML or Pro GeoRSS goes to the next level of complexity and allows different coordinate reference systems and all of Geography Markup Language (GML) for tagging content in the feed. This is most likely to be used by really "geeky" geospatial users and scientists and/or by specific communities that want to share specialized information.

With those basics, it's time to play with GeoRSS. To do that you need two things: someone publishing GeoRSS feeds and software that understands GeoRSS. Good news - both are freely available on the Web! And, for future reference, more and more companies are implementing readers and writers into their desktop and Web software.

Several Web applications allow regular people (non-programmers) to use GeoRSS to make maps. (I'm hoping to find more soon. Google? Ask.com? MapQuest?) First up, ACME. You get a sense of the company from its tagline: " Graphics * Unix * Networks * Fun, Purveyors of fine freeware since 1972." They build all sorts of tools, including the ACME GeoRSS Map Viewer that uses the Google Maps and Yahoo's Maps APIs. So far as I know, it only knows how to read W3C GeoRSS at this time. To start, check out this link, a map of California State Parks fed by an RSS feed at http://mapnut.com/calstatepark.xml: http://www.acme.com/GeoRSS/?xmlsrc=http://mapnut.com/calstatepark.xml

A GeoRSS feed populates ACME's GeoRSS Map Viewer with State Parks in California.

Did you look at that URL carefully? It's the ACME URL, then an equals sign, then the URL of a GeoRSS feed. So, you can pretty much put any feed in there and (if all goes right) make your own map. Try putting in this GeoRSS feed in place of the State Parks one: http://earthquake.usgs.gov/eqcenter/recenteqsww/catalogs/eqs7day-M2.5.xml
That's a GeoRSS feed from USGS of real-time, worldwide earthquake list for the past seven days. Your URL should be: http://www.acme.com/GeoRSS/?xmlsrc=http://earthquake.usgs.gov/eqcenter/recenteqsww/catalogs/eqs7day-M2.5.xml

Here's just a bit of what it looked like when I wrote this article. Your maps should look different since USGS is publishing real time data. Further, if you want to, you can add as many GeoRSS feeds as you like using this syntax: http://www.acme.com/GeoRSS/?xmlsrc=http://example.com/xmlfile1.xml&xmlsrc=http://example.com/xmlfile2.xml

A bit of the "past seven days earthquake map" from May 30th created from the USGS GeoRSS feed.

A second GeoRSS reader is Mapufacture, "the GeoRSS aggregator," which is built on Google Maps. The developer, Mikel Maron, is one of the people behind GeoRSS. Maron lists a bunch of feeds with which to play and some of his examples show more advanced uses of GeoRSS, including this weather map example.

To understand this weather map, first be aware that Yahoo offers up weather and traffic data using (W3C + their own tags) GeoRSS. The weather map example programmatically queries the Yahoo feed for just the locations and weather for four locations. If you click on a location, the weather information appears below the map, so you may need to scroll down to see it.

But, along with the advanced stuff, Mapufacture offers a simple way to build your own map from a GeoRSS feed. You'll need a login/password to do this. Get one by choosing "create a map" from the options across the top of the site. Once you are logged in, fill in the boxes below the map with a title and description, and then zoom to an area of interest (if you want the map to display "zoomed in" to a specific area). Next, save the map. Now, the fun part. Click on "Add feed" at the top of the map and add one or more feeds to populate the map! I set my extents around Cambridge, Massachusetts and added a feed of area events.

Creating a map using Mapufacture.

My Cambridge events map populated via a GeoRSS feed.

Consider what this all means. In time, should things go as I hope they will, anyone, anywhere, could build his or her own instant mashup of just the data needed on whatever basemap and with whatever technology (desktop, Web, etc.) makes sense.

Who would put out GeoRSS feeds? Anyone who sees the added value of including location with their data. Consider these ideas: a grocery or specialty store might offer a feed that highlights the different specials in different geographies (thanks to Pierce Eichelberger for that idea), news organizations might tag their news with geographic location(s), government and other organization might offer data from sensors (like the earthquake data or traffic data).

How would they create the feeds? Most RSS feeds are automatically created by software. And, even now, there's an RSS to GeoRSS tool to input the coordinates automatically into regular RSS feeds. I suspect that folks like MetaCarta (a company that offers tools to geocode unstructured text) would offer a more advanced technology or services like this.

What sort of software would "read" the GeoRSS feeds? I know of one desktop GIS software that does (Cadcorp SIS, for example) and I understand there's a plugin for WordPress (blogging software) as well. ESRI's ArcWeb Explorer will support GeoRSS, though I've not gotten it to work as of this writing. (To try it, just paste a GeoRSS URL into the search box.) So, I expect support for GeoRSS will pop up in a lot of places.

The Way Forward
What do we, the geospatial user community, need to do to grow GeoRSS, if we think it's valuable?

First, we need to get our act together. We (whoever cares about this, which I hope readers do) need to make clear which format we are using (W3C geo, Simple GeoRSS or Pro GeoRSS) and ensure some level of compatibility.

Second, we need to let vendors know we value tools, for both end users and programmers, to write and read the GeoRSS.

Third, we need to get those with interesting geospatial data to publish them using GeoRSS. (Could be free or could be for a fee. This is simply a standard way to publish.)

Finally, we can help educate others on what this very simple idea might mean if taken to its full potential. I hope I've started readers on that path with this short article.

Reprinted with permission, Copyright 2007, Directions Media





* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    • 访问:605121次
    • 积分:6568
    • 等级:
    • 排名:第3780名
    • 原创:56篇
    • 转载:48篇
    • 译文:5篇
    • 评论:164条