[georss] So Many formats - so little button space...
Christopher Schmidt
crschmidt at crschmidt.net
Fri Jun 30 18:35:50 EDT 2006
On Fri, Jun 30, 2006 at 04:14:25PM -0400, Andrew Turner wrote:
> A question to implementers/consumers of GeoRSS.
>
> If you look through the entire 'menu' of GeoRSS options, there are
> quite a few combinations.
>
> You have at least 3 XML options: Atom, RDF, RSS2
> And 3 GeoRSS flavors: GML, Simple, W3C Geo
>
> Together, those examples alone comprise 9 possible, valid, formats.
> How has anyone addressed this plethora of options, or does anyone have
> a suggestion? Should a each XML option embed all 3 flavors of XML?
> Should an application choose 1 flavor of GeoRSS for all of its feeds?
> What about consuming? You now have to put the 3 flavors of GeoRSS in
> each of your 3 XML parsers.
First of all, only create one feed output. Unless you have a
specific reason for creating multiple feeds, you should never generate
multiple feeds which produce the same content. Pick one, and go with it.
Typically this will be the feed you already support -- if you don't yet
support a feed, pick one, and support it.
I would not use GML unless I had some kind of use case for it that I
haven't seen yet. If I was creating a new feed, I would probably go with
GeoRSS Simple.
When I wrote a consumer, I included support for Simple and W3C Geo, in
RSS 1.0 and RSS 2.0. The way I did this was simple: simply look for an
'item' element, then for all item elements, see if they have either
georss:* fields, or geo:lat and geo:long. Grab the title tag, look for a
description tag, and you're done. This could be easily extended to Atom
by changing my 'item' search to be 'item or entry'.
Depending on what you do as a consumer, you may need more complexity
than this, but for displaying points-on-a-map, this is all I needed.
(parseData function in
http://svn.openlayers.org/trunk/openlayers/lib/OpenLayers/Layer/GeoRSS.js
is a BSD licensed implementation which does pretty much exactly that.)
--
Christopher Schmidt
Web Developer
More information about the georss
mailing list