I was thinking about creating a GeoRSS plugin for Wordpress, something that would allow one to tag posts with coordinates and then add the coordinates to the RSS feed in the proper format. Before I started, though, I realized somebody probably built it already. So I did a few Google searches and here's what I found:
The Geonames RSS to GeoRSS converter: A webservice that reads the entries of an RSS feed and searches the Geonames Database to find a location for the entry text. If a relevant location is found, its latitude and longitude are added to the RSS feed using the GeoRSS encoding.
[[ This seems like fun, but it's not what I'm looking for at the moment. ]]
Geo Plugin: Allows one to attach geographic coordinate information to posts. It also permits the specification of a default geographic location for the entire WordPress blog.
[[ Ok, this sounds like it will do at least half the job. … And it works great! Geo not only allows me to add ad hoc coordinates to a post, but it can also store locations! Perfect.]]
[[ … ]]
It appears that I'll have to hack wp-rss.php or wp-rss2.php to produce a GeoRSS feed. The Geo plugin provides some instructions on how to do this, but I'd prefer not touching these files (since my changes will get overwritten when I update).
GeoPress is pretty cool as well and promises a GeoRSS feed, but, again, I'll have to touch wp-rss.php or wp-rss2.php. Plus GeoPress seems a bit more robust than I want.
[[ … ]]
schiller labs is now GeoRSS compatible, using the GeoRSS GML encoding (the feed even validates). To make this happen, I had to tweak Geo a bit. So, if you want the GML encoding, you'll have to download the zip here. Decompress and install as usual.
Then add the following namespace declarations to the <rss> tag in wp-rss2.php:
- xmlns:georss="http://www.georss.org/georss"
- xmlns:gml="http://www.opengis.net/gml"
Finally add the following code inside the <item> tag:
<?php get_the_rss_geotags(); ?>