<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marcus Povey &#187; georss</title>
	<atom:link href="http://www.marcus-povey.co.uk/tag/georss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marcus-povey.co.uk</link>
	<description>Making the world a better place, one byte at a time...</description>
	<lastBuildDate>Fri, 16 Jul 2010 09:00:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel='hub' href='http://www.marcus-povey.co.uk/?pushpress=hub'/>
		<item>
		<title>Geocoding Elgg entities</title>
		<link>http://www.marcus-povey.co.uk/2009/08/28/geocoding-elgg-entities/</link>
		<comments>http://www.marcus-povey.co.uk/2009/08/28/geocoding-elgg-entities/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 14:23:24 +0000</pubDate>
		<dc:creator>Marcus Povey</dc:creator>
				<category><![CDATA[elgg]]></category>
		<category><![CDATA[#ue]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[georss]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://www.marcus-povey.co.uk/?p=280</guid>
		<description><![CDATA[Geotagging and GeoRSS support has been available in Elgg for a little while now, but like so many cool features of the platform, I haven&#8217;t really had the time to draw people&#8217;s attention to it. Although I am drawing your attention to it now, it should be noted that this is still somewhat under development! [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://georss.org/Main_Page"><img src="http://www.marcus-povey.co.uk/wp-content/georss_logo.png" alt="" align="right" /></a>Geotagging and <a href="http://georss.org/Main_Page">GeoRSS</a> support has been available in Elgg for a little while now, but like so many cool features of the platform, I haven&#8217;t really had the time to draw people&#8217;s attention to it.</p>
<p>Although I am drawing your attention to it now, it should be noted that this is still somewhat under development!</p>
<h2>Anatomy of a geocoder</h2>
<p>To begin geocoding your data you will need a geocoder. This is not something that Elgg comes installed with by default, <a href="http://community.elgg.org/pg/plugins/marcus/read/107702/google-maps-geocoder">although here&#8217;s one I coded earlier</a>.</p>
<p>This geocoder users the <a href="http://code.google.com/apis/maps/">Google maps API</a> to do the actual encoding, and provides two primary features.</p>
<ul>
<li>It handles the plugin hook &#8220;geocode&#8221;,&#8221;location&#8221;</li>
<li>It listens to all create events and attempts to tag it with the latitude and longitude &#8211; either from a -&gt;location metadata on the object itself, or from the user&#8217;s current -&gt;location &#8211; you could get more creative, this is a simple example.</li>
</ul>
<p>When you attempt to geocode a location you call the function <a href="http://reference.elgg.org/location_8php.html#3dfde0e2643efcff5feee626e098a368">elgg_geocode_location()</a>. This in turn triggers the above plugin hook and attempts to encode the data.</p>
<p>For efficiency once a location has been geocoded the result is cached. Future attempts to code the same location will return the result from the cache.</p>
<p>Once installed and configured, new content (wire posts etc) will be tagged with a latitude and longitude. Fill in your profile location field and try it out for yourself!</p>
<h2>Location based searches</h2>
<p>Once things are tagged with a location, you can start to use location as a starting point for searching by using some of the <a href="http://reference.elgg.org/location_8php-source.html">location aware search functions in location.php</a>.</p>
<p>This hasn&#8217;t currently been hooked up to the Elgg interface in any way, but that doesn&#8217;t stop you making use of it in your plugins.</p>
<h2>GeoRSS</h2>
<p>This is something you&#8217;ll be pleased to know that you get for free!</p>
<p>As you list your entities using the <a href="http://docs.elgg.org/wiki/Views#Listing_entities">Elgg listing tools</a> using the RSS view, if an entity has a position defined it will be included using standard geoRSS simple notation, i.e:</p>
<blockquote><p><code>&lt;georss:point&gt; 45.256 -71.92 &lt;/georss:point&gt;</code></p></blockquote>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcus-povey.co.uk/2009/08/28/geocoding-elgg-entities/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
