[georss] GeoRSS support for feedparser.py

Sean Gillies sgillies at frii.com
Tue Jul 31 11:07:19 EDT 2007


Hi all,

I submitted a patch to Mark Pilgrim's Universal Feed Parser that adds 
support for GeoRSS Simple, and hope that it will get into the 4.2 release

http://code.google.com/p/feedparser/issues/detail?id=58

Meanwhile, here's a patch to feedparser 4.1 for anybody who's interested:

http://trac.gispython.org/projects/PCL/attachment/ticket/121/feedparser-georss-4.1.patch

Here's an example from the ticket:

> Point example:
> 
>   <feed
>     xmlns="http://www.w3.org/2005/Atom"
>     xmlns:georss="http://www.georss.org/georss"
>     >
>     <entry>
>       <georss:point>36.9382 31.1732</georss:point>
>     </entry>
>   </feed>
> 
> yields:
> 
>   >>> entry['geometry']['type']
>   'Point'
>   >>> entry['geometry']['coordinates']
>   (31.1732, 36.9382)

Those of you familiar with the GeoJSON draft will recognize this 
geometry representation. It's trivially serializable to JSON. Note that 
since we're all North-is-up xyz Cartesian thinkers in GeoJSON, 
coordinate order is (longitude, latitude [,elevation]). I've also made 
it explicit in feedparser.py that omission of elevation is equivalent to 
specifying an elevation of 0 meters above ground level (AGL). IMO, 
elevation is currently underspecified in GeoRSS 1.0.

Cheers,
Sean



More information about the georss mailing list