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

news/2024/11/6 8:48:45

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.

Playtime!
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.

Musings
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

 

 

 





http://www.niftyadmin.cn/n/3656052.html

相关文章

The following method did not exist (maven依赖冲突解决全记录)

文章目录1、运行报错2、下载Maven Helper3、分析依赖冲突4、解决冲突1、运行报错 完整的报错信息如下: _ _ |_ _ _|_. ___ _ | _ | | |\/|_)(_| | |_\ |_)||_|_\ / | 3.1.1 2022-08-16 16:40:25 ERROR [main] [org.eclipse.xtext.s…

Python + pymysql 之 MySQL 查询操作

在MySQL中构建一个测试表,如下: 查询单条数据 # -*- coding: UTF-8 -*- import pymysqldef mysql_query():"""MySQL查询:return:"""# 打开数据库连接db pymysql.connect(host"127.0.0.1",user"root"…

RESTful GeoWeb学习手记(一):构建REST风格的网络服务

RESTful GeoWeb学习手记(一):构建REST风格的网络服务粟卫民http://www.gisdev.cn/ http://blog.csdn.net/suen/ 日期:2007-8-14保留所有版权。如需转载,请联系作者,并在醒目位置注明出处GeoWeb是一个新造出…

bug减半、工资翻倍(1024)

祝所有程序员:“程”风破浪“序”怀若谷“员”见卓识“节”节高升“日”积月累“快”马加鞭“乐”在其中************************************************ bug减半 **********************************************************“程”风破浪 “序”怀若谷 “员…

RESTful GeoWeb学习手记(二):GeoWeb大会介绍

RESTful GeoWeb学习手记(二):GeoWeb大会介绍粟卫民http://www.gisdev.cn/ http://blog.csdn.net/suen/ 日期:2007-9-19保留所有版权。如需转载,请联系作者,并在醒目位置注明出处GeoWeb大会(http…

如何理解java的值传递?

1、基本数据类型(值传递) java中的基本数据类型可以在栈(stack)中直接分配内存,它有以下八种: boolean,byte,char,short,int,long,f…

GOOGLE地球浏览器分析(七):开发人员讲述的Google Earth真正工作原理

GOOGLE地球浏览器分析(七):开发人员讲述的Google Earth真正工作原理粟卫民http://www.gisdev.cn/ http://blog.csdn.net/suen/ 日期:2007-07-09转载:http://www.realityprime.com/articles/how-google-earth-really-wo…

基于.NET 2.0的GIS开源项目SharpMap分析手记(十二):SharpMap WMS服务及其Openlayers访问

基于.NET 2.0的GIS开源项目SharpMap分析手记(十二):SharpMap WMS服务及其Openlayers访问粟卫民 http://www.gisdev.cn/ http://blog.csdn.net/suen/ 日期:2007-7-12保留所有版权。如需转载,请联系作者,并在…