<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"
>

<channel>
	<title>High Earth Orbit &#187; Howto</title>
	<atom:link href="http://highearthorbit.com/category/engineering/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://highearthorbit.com</link>
	<description>Transmitting ideas, observations, and images from 42,000 km.</description>
	<lastBuildDate>Thu, 27 Oct 2011 17:23:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Migrating a site from PHP to Rails</title>
		<link>http://highearthorbit.com/migrating-a-site-from-php-to-rails/</link>
		<comments>http://highearthorbit.com/migrating-a-site-from-php-to-rails/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 10:53:45 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/migrating-a-site-from-php-to-rails/</guid>
		<description><![CDATA[I learn best by picking a project and learning a new technology by applying it to the project. This is how I originally learned PHP, MySQL, and various web technologies when developing the Detroit Curling Club site/portal. Looking back, it&#8217;s amazing I got done what I did with what I knew. I implemented a Wiki, [...]]]></description>
			<content:encoded><![CDATA[<p>I learn best by picking a project and learning a new technology by applying it to the project. This is how I originally learned PHP, MySQL, and various web technologies when developing the <a href="http://detroitcurlingclub.com" title="Detroit Curling Club" rel="me">Detroit Curling Club</a> site/portal. Looking back, it&#8217;s amazing I got done what I did with what I knew. I implemented a Wiki, CMS, user management, uploading, RSS, and so forth, from the ground up, with no frameworks <shudder>. </p>
<p>However, the result also means the code is, shall we say, &#8220;spaghetti&#8221;. And is really no fun to maintain and add to. Since then, I&#8217;ve learned Ruby and Rails and really enjoy working in the language and framework and wanted to reimplement the site. With so many other projects going on, I was concerned about the time necessary to get the site migrated. </p>
<p>Actually, it was rather easy. by stroke of fortune. Here is how the work went.</p>
<h3>On the catwalk&#8230;</h3>
<p>By similar mindset, when I designed the original database schema, I used &#8220;rails-esque&#8221; naming: tables are plural, columns are simple singular names. Join tables are alphabetical of the two tables they are joining. I just had to migrate the names of a couple of tables and columns to mee the rails standard configuration. I could have overriden the table/column names, but didn&#8217;t want to deal with maintaining that. I really wanted the site to work like it was originally written with Rails in mind. </p>
<p>You&#8217;ve obviously created a Rails application by now, so I&#8217;ll skip that. Now, I have my database (with backups). Setup your <code>config/database.yml</code> to point to the database and then run <code>rake db:schema:dump</code> to create the schema.rb of the database. If you want, you can copy this to a migration file. </p>
<p>Next, install <a href="http://magicmodels.rubyforge.org/" title="Dr. Nic's Magic Models at RubyForge">Dr. Nic&#8217;s Magic Models</a>, which automagically give you your model files, associations, basic validations, and so forth with <em>no coding</em>. Magic just begins to describe it. You can verify this by bringing up <code>script/console</code> and toying with your models and associations.  </p>
<h3>Testing is good</h3>
<p>A good idea at this point is to load <a href="http://www.openqa.org/selenium-ide/" title="Selenium IDE">Selenium</a>, a web user-interface testing application, and walk over your original site to create user interface requirements based on current site design. This should stand as your base-line specification. In the end, your Rails app should act like your current application. </p>
<p>You can also check out the work of <a href='http://blog.hasmanythrough.com/articles/2006/08/27/validate-all-your-records' title='Has Many Through blog'>Josh Susser</a> who has a ruby script that will validate all the records in your database using your model validations.</p>
<p>Define your application test specification using <a href="http://www.lukeredpath.co.uk/2006/8/29/developing-a-rails-model-using-bdd-and-rspec-part-1" title="Luke Redpath: Behaviour Driven Design">RSpec and BDD</a>. Again, you already have an existing web application to help define your desired functionality. </p>
<h3>The View, the View</h3>
<p>Now you have a your base application done. You should start migrating your views. Fill in your <code>layout/application.rhtml</code> with the base layout from your original HTML files.  </p>
<p>You&#8217;ll now need to start actually defining your controllers for various functionality: calendar, users, leagues, etc. Along the way, run your tests you defined with RSpec and verify operation. This is where the actual work comes in. Overall though, I find the design of Rails to make this very easy going. I just have to deal with various legacy functionality.</p>
<p>I&#8217;m also looking more at <a href="http://www.ujs4rails.com/" title="Unobtrusive Javascript for Rails">Unobtrusive Javascript for Rails</a> (ujs4rails) at how to handle graceful degradation (or is it graceful upgrading) to browsers that may not support javascript. </p>
<h3>Work in Progress</h3>
<p>That all said, migrating the site has been very easy. So easy I&#8217;m looking at migrating other projects to Rails. Of course, deploying Rails applications to shared hosts is not nearly as easy as deploying PHP ones. Especially with applications that are meant for other users to easily install on their own hosts. But the ease of development and maintenance is not easily overlooked. </p>
<p>If only Apache supported a built-in Rails module. <img src='http://highearthorbit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/migrating-a-site-from-php-to-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextMate Bundles</title>
		<link>http://highearthorbit.com/textmate-bundles/</link>
		<comments>http://highearthorbit.com/textmate-bundles/#comments</comments>
		<pubDate>Sun, 01 Oct 2006 20:33:14 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/textmate-bundles/</guid>
		<description><![CDATA[I&#8217;m learning the power that is TextMate (like Emacs, but prettier). TextMate really is setting itself up to be a rather decent OS for editing. From within TextMate I can blog, keep a todo list, program in any number of languages, WYSIWYG webpage editing, and calendaring. Heck, mix TextMate and Quicksilver and who *needs* Finder. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m learning the power that is <a href="http://macromates.com" title="Macromates Homepage">TextMate</a> (like Emacs, but prettier). TextMate really is setting itself up to be a rather decent OS for editing. From within TextMate I can <a href="http://macromates.com/blog/archives/2006/06/19/blogging-from-textmate/" title="Textmate Blog: Blogging from Textmate">blog</a>, keep a todo list, program in any number of languages, WYSIWYG webpage editing, and calendaring. Heck, mix TextMate and Quicksilver and who *needs* Finder. I picked up the new <a href="http://www.pragmaticprogrammer.com/titles/textmate/" title="TextMate: Power Editing for the Mac">Pragmatic Programmer&#8217;s TextMate book</a> to learn more of the underpinnings and how to stop repeating myself with simple tasks.</p>
<p>Like my thoughts on why plugins make, TextMate has excellent support via <a href="http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/" title="Textmate subversion repository: bundles">bundles</a> (over 124 of them). However, the only way to get to these is via subversion. This is nice because it keeps me up to date, but is a little annoying having to get the subversion command right and path all the time.</p>
<p>So I wrote a small shell script to grab a bundle, <code>get_tmbundle</code>:</p>
<pre>#!/bin/bash
svn --username anon --password anon co http://macromates.com\
/svn/Bundles/trunk/Bundles/$1.tmbundle ~/Library/Application Support/TextMate/Bundles/$1.tmbundle
</pre>
<p>I can then <code>$ get_bundle AppleScript</code> to get a new bundle installed. </p>
<p>You <em>could</em> also use the <a href="http://validcode.net/stuff/textmate-getbundle-bundle" title="valid code.net">getBundle Bundle</a>, but that seems like cheating. Of course, <a href="http://validcode.net/stuff/textmate-getbundle-bundle">getBundle</a> also has an AutoUpdater and is baked into TextMate as a bundle itself (how deep does the Rabbit Hole go?)</p>
<p><!-- technorati tags start -->
<p style="text-align:right;font-size:10px;">Technorati Tags: <a href="http://www.technorati.com/tag/mac os x" rel="tag">mac os x</a>, <a href="http://www.technorati.com/tag/macosx" rel="tag">macosx</a>, <a href="http://www.technorati.com/tag/programming" rel="tag">programming</a>, <a href="http://www.technorati.com/tag/subversion" rel="tag">subversion</a>, <a href="http://www.technorati.com/tag/textediting" rel="tag">textediting</a>, <a href="http://www.technorati.com/tag/textmate" rel="tag">textmate</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/textmate-bundles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Daily del.icio.us blog posting</title>
		<link>http://highearthorbit.com/daily-delicious-blog-posting/</link>
		<comments>http://highearthorbit.com/daily-delicious-blog-posting/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 23:08:25 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/daily-delicious-blog-posting/</guid>
		<description><![CDATA[By popular demand (ok, one request), I am putting up instructions on how to have your del.icio.us links posted daily to your blog.
I like this, as feed readers then have a succinct list of interesting sites to show (rather than a sidebar, who goes to a blog anymore?). A list of links is often more [...]]]></description>
			<content:encoded><![CDATA[<p>By popular demand (ok, one request), I am putting up instructions on how to have your <a href='http://del.icio.us/' title='del.icio.us'>del.icio.us</a> links posted daily to your blog.</p>
<p>I like this, as <a href='http://fofredux.sf.net' title='FoFRedux RSS Aggregator'>feed readers</a> then have a succinct list of interesting sites to show (rather than a sidebar, who <em>goes</em> to a blog anymore?). A list of links is often more interesting than some half-written paragraph of diatribe just to get to the point. (case in point).</p>
<h2>How to setup del.icio.us to post daily links</h2>
<ol>
<li>Log into <a href='http://del.icio.us/' title='del.icio.us'>del.icio.us</a></li>
<li>On the right-side, under &#8220;experimental&#8221;, choose &#8220;daily blog posting&#8221;</li>
<li>Click &#8220;add new thingy&#8221; (yes, it really says &#8220;thingy&#8221;, those crazy del.icio.users</li>
<li>Fill in the form as appropriate, here is an example:
<ul>
<li>job_name: DailyLinks</li>
<li>out_name: (blog user &#8211; e.g. delicious)</li>
<li>out_pass: (blog password for that user)</li>
<li>out_url: http://highearthorbit.com/xmlrpc.php</li>
<li>out_time: 3 (approx time to post, in GMT)</li>
<li>out_blog_id: (leave this blank) </li>
<li>out_cat_id: (category id, look at the id in your blogging software)</li>
</ul>
</li>
<li>Click &#8220;Submit Query&#8221;</li>
</ul>
<p>Sometime within the appointed hour (they&#8217;re spaced out so neither del.icio.us&#8217;s servers, or ping services, are flooded &#8216;on the hour&#8217;) your new links will be posted. </p>
<p>For this blog, I created a new user, gave that user Author privileges, and created a specific category, <a href='http://highearthorbit.com/category/bookmarks/' title="HighEarthOrbit BookMarks category" rel="me">bookmarks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/daily-delicious-blog-posting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>No LaTeX, never fret</title>
		<link>http://highearthorbit.com/no-latex-never-fret/</link>
		<comments>http://highearthorbit.com/no-latex-never-fret/#comments</comments>
		<pubDate>Wed, 12 Jul 2006 20:43:41 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/no-latex-never-fret/</guid>
		<description><![CDATA[So you&#8217;re writing a paper with citations and you&#8217;re wishing you had LaTeX&#8217;s beautiful self-referencing ability to your list of references. However, for whatever reason, you&#8217;re stuck using Microsoft Word. And clicking through Insert->Reference->Cross-reference&#8230;, then scroll to find your article, and set to paragraph number, etc. has got you really down.
Bet you didn&#8217;t know about [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;re writing a paper with citations and you&#8217;re wishing you had LaTeX&#8217;s beautiful self-referencing ability to your list of references. However, for whatever reason, you&#8217;re stuck using Microsoft Word. And clicking through <em>Insert</em>-><em>Reference</em>-><em>Cross-reference&#8230;</em>, then scroll to find your article, and set to paragraph number, etc. has got you really down.</p>
<p>Bet you didn&#8217;t know about field codes. Instead, just put your cursor in your citation brackets (or whatever you use), press <em>&lt;ctrl&gt;</em>-F9, and then <code>REF NameYear \n</code>. </p>
<pre><code>... demonstrated in on an airship [{REF Turner02 \n}].</code></pre>
<p>The <code>\n</code> specifies that you want the paragraph number of the reference, which equates to the ordered-list number. Later, in your references section, you will <em>Insert</em>-><em>Bookmark</em> and properly name your citations (again, I use NameYear). You then need to hit <em>Alt</em>-<em>F9</em> turn &#8216;hide&#8217; all the field codes in your doc and update and they&#8217;ll all be linked.</p>
<p>It&#8217;s not pretty, it&#8217;s not LaTeX (not that LaTeX is pretty either), but it works.</p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/no-latex-never-fret/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>GeoNames supports reverse geocoding</title>
		<link>http://highearthorbit.com/geonames-supports-reverse-geocoding/</link>
		<comments>http://highearthorbit.com/geonames-supports-reverse-geocoding/#comments</comments>
		<pubDate>Mon, 26 Jun 2006 13:21:04 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/geonames-supports-reverse-geocoding/</guid>
		<description><![CDATA[GeoNames is YAG (yet another geocoder), but behind the curtains lie many cool features. The most unique of which is a reverse geocoder. 
Reverse geocoding is converting Latitude &#038; Longitude to a place name. This is the other side of the mirror from traditional geocoding, which converts a place name into latitude &#038; longitude. Why [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.geonames.org/'>GeoNames</a> is YAG (yet another geocoder), but behind the curtains lie many cool features. The most unique of which is a reverse geocoder. </p>
<p>Reverse geocoding is converting Latitude &#038; Longitude to a place name. This is the other side of the mirror from traditional geocoding, which converts a place name into latitude &#038; longitude. Why would someone want to reverse geocode you ask? With reverse geocoding you can convert your GPS tracklogs into meaningful locations easily, or allow users to click on a map and get back actual location of where they&#8217;re clicking.</p>
<p>The <a href='http://www.geonames.org/export/'>GeoNames API</a> provides an interface for getting nearby postal codes, country, or most specific: place names.</p>
<h2>Example</h2>
<p>HighEarthOrbit offices: <code>http://ws.geonames.org/findNearbyPlaceName?lat=42.4266&#038;lng=-83.4931&#038;style=full</code></p>
<p>returns:</p>
<pre>
&lt;geonames&gt;
  &lt;geoname&gt;
    &lt;name&gt;Northville&lt;/name&gt;
    &lt;lat&gt;42.43111&lt;/lat&gt;
    &lt;lng&gt;-83.48333&lt;/lng&gt;
    &lt;geonameid&gt;5003956&lt;/geonameid&gt;
    &lt;countrycode&gt;US&lt;/countrycode&gt;
    &lt;countryname&gt;United States&lt;/countryname&gt;
    &lt;fcl&gt;P&lt;/fcl&gt;
    &lt;fcode&gt;PPL&lt;/fcode&gt;
    &lt;fclname&gt;city, village,...&lt;/fclname&gt;
    &lt;fcodename&gt;populated place&lt;/fcodename&gt;
    &lt;population&gt;6360&lt;/population&gt;
    &lt;elevation&gt;252&lt;/elevation&gt;
    &lt;admincode1&gt;MI&lt;/admincode1&gt;
    &lt;adminname1&gt;Michigan&lt;/adminname1&gt;
    &lt;admincode2 /&gt;
    &lt;adminname2 /&gt;
  &lt;/geoname&gt;
&lt;/geonames&gt;
</pre>
<h2>The whole geo-enchilada</h2>
<p>Lastly, to make you really feel warm and good inside, the GeoNames database is provided for direct download under a <a href='http://creativecommons.org/licenses/by/2.5/'>Creative Commons Attribution license</a>. Yum, free data. </p>
<p>See <a href='http://geonames.wordpress.com/2006/06/25/tiger-line-reverse-geocoder/'>the GeoNames Blog post</a> about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/geonames-supports-reverse-geocoding/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Bluelogger GPS</title>
		<link>http://highearthorbit.com/bluelogger-gps/</link>
		<comments>http://highearthorbit.com/bluelogger-gps/#comments</comments>
		<pubDate>Wed, 03 May 2006 17:03:00 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/bluelogger-gps/</guid>
		<description><![CDATA[For the past several months I&#8217;ve been playing with the Delorme Bluelogger GPS. It&#8217;s a very nice GPS receiver in its own right, but has the unique feature (for BT receivers) of including onboard logging. This is an great feature as it allows me to turn on the unit, toss it in my bag (somewhere [...]]]></description>
			<content:encoded><![CDATA[<p>For the past several months I&#8217;ve been playing with the <a href="http://www.delorme.com/bluelogger/">Delorme Bluelogger GPS</a>. It&#8217;s a very nice GPS receiver in its own right, but has the unique feature (for BT receivers) of including onboard logging. This is an <em>great</em> feature as it allows me to turn on the unit, toss it in my bag (somewhere on top, so it can still get a view of the sky) and forget about it. I don&#8217;t need to grab multiple devices, such as the receiver and a PDA or computer in order to receive and store my GPS waypoints.</p>
<p>This article will give a short overview of how to use the BlueLogger for a variety of applications. I use it primarily for geolocating photographs, but it&#8217;s also nice for any location-based activity. </p>
<p>The Bluelogger comes with the following:</p>
<ul>
<li>Bluelogger device</li>
<li>Carrying case (with belt loop)</li>
<li>Car charger</li>
<li>Wall charger</li>
<li>Charging stand (can work with either car or wall charger)</li>
<li>Bluelogger Windows software</li>
</ul>
<h2>Connecting to GPS</h2>
<p>To connect to the Bluelogger, you will need a bluetooth adapter. Many computers now come with bluetooth built-in or as an add-on option. If this isn&#8217;t the case, I would recommend the <a href="http://www.amazon.com/exec/obidos/redirect?link_code=ur2&#038;tag=httphigheacom-20&#038;camp=1789&#038;creative=9325&#038;path=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2FB00006B7DB%3Fv%3Dglance%2526n%3D172282">D-Link DBT-120</a><img src="http://www.assoc-amazon.com/e/ir?t=httphigheacom-20&amp;l=ur2&amp;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />. It&#8217;s probably the <em>only</em> D-Link product I can recommend, but I&#8217;ve had great luck with them, and never run into any device that it hasn&#8217;t worked with (and I have had problems with other BT adapters, especially on my Mac).</p>
<p>Once you have a bluetooth adapter, you will need to setup a connection to the device by pairing them. See your devices&#8217;/operating systems&#8217; manuals on how to do this.</p>
<p>A very slick option is to run <a href="http://gpsd.berlios.de/">gpsd</a>, which is a service-daemon running in the background that allows multiple connections to the single GPS device. Normally, only 1 software instance can connect at a time. With GPSd, you can &#8220;serve&#8221; your location. What would be really cool is to have GPSd be able to connect in with Geolocation by IP or Wifi as well as an actual GPS device to seamlessly switch between location technique.</p>
<p><a href="http://www.versiontracker.com/dyn/moreinfo/macosx/24559">GPSUtility</a> is a nice, compact, graphical GPS application for Mac OS X. It can connect either directly to the GPS bluetooth port, or via gpsd. You can view location, satellite strengths, verbose NMEA output, and speed. </p>
<p><a href="http://kismac.binaervarianz.de/">KisMac</a>, while not a GPS-specific applicaiton, has excellent GPS support. <a href="http://kismac.binaervarianz.de/">KisMac</a> is actually a wireless stumbler, which can also mark the latitude, longitude, and strength of detected networks and plot these on a map.</p>
<h2>Storing &#038; Viewing tracks</h2>
<p>The Bluelogger software (currently Windows only) can export the tracks as GPL files. <a href="http://www.gpsbabel.org/">GPSBabel</a> can convert these to a more useful format, such as GPX, which an XML format for GPS data. </p>
<p>Since using the bluelogger usually entails turning it on and off often, the entire track log will contain many separate trips. <a href="http://www.gpsbabel.org/">GPSBabel</a> supports splitting up tracks based on a time separation. Each segment will be a self-contained track. </p>
<p>The following example will convert a GPL file to a <a href='http://www.topografix.com/gpx_resources.asp'>GPX</a> file, and make a individual track for any separation of 4 hours between points. </p>
<pre>
<code>
$ gpsbabel
  -i gpl -f Track_2005_11_23.gpl
  -x track,pack,split=4h,title="LOG # %c"
  -o gpx -F Track_2005_11_23.gpx
</code>
</pre>
<h2>Displaying tracks</h2>
<p>There are several options for displaying your tracks:</p>
<p><a href="http://highearthorbit.com/projects/map/tracks.html">GPX Tracks</a></p>
<p><a href="http://www.obviously.com/gis/gpx_loader.html">GPXLoader</a></p>
<ul>
<li><a href="http://highearthorbit.com/projects/map/tracks.js">GPX Tracks HTML file</a></li>
</ul>
<h2>GPS and Nokia 770</h2>
<p><a href='http://thoughtfix.blogspot.com'>ThoughtFix</a> has a fairly comprehensive tutorial on <a href='http://thoughtfix.blogspot.com/2006/02/howto-bluetooth-gps-and-gpsdrive-on.html'>setting up GPSDrive with a Bluetooth GPS receiver</a>. They went with the i-Blue High Sensitivity Bluetooth GPS, which looks like a nice unit, but lacks logging.</p>
<h2>Resources</h2>
<ul>
<li><a href="http://www.gpsnavx.com/index.php?page=NMEA">NMEA Protocol fields</a></li>
<li><a href='http://dave.runningland.com/grunninglogs/'>GPS Running Log -> GoogleMap on website</a></li>
<li><a href='http://www.chebucto.ns.ca/~rakerman/geocode-photos.html'>Geocode Photos</a></li>
<li><a href='http://www.robogeo.com/home/'>RoboGeo</a> Windows photo-geocoding</li>
<li><a href='http://oziphototool.alistairdickie.com/'>OziPhotoTool</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/bluelogger-gps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GreaseRoute &#8211; Mapping the web</title>
		<link>http://highearthorbit.com/greaseroute-mapping-the-web/</link>
		<comments>http://highearthorbit.com/greaseroute-mapping-the-web/#comments</comments>
		<pubDate>Tue, 02 May 2006 02:22:24 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/greaseroute-mapping-the-web/</guid>
		<description><![CDATA[I&#8217;ve been fairly quiet for the past couple of weeks. I&#8217;ve been focused on some projects, including entries to the MapQuest OpenAPI developers&#8217; competition. 
One of my entries, which may or may not actually be considered a &#8220;mashup&#8221;, is a Firefox GreaseMonkey script called GreaseRoute that creates map and route icons for an Microformat formatted [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://code.highearthorbit.com/greaseroute/FlockRoute_thumb.png' align='right' hspace='5px;' vspace='5px'/>I&#8217;ve been fairly quiet for the past couple of weeks. I&#8217;ve been focused on some projects, including entries to the <a href='http://mapquest.com/openapi'>MapQuest OpenAPI</a> developers&#8217; competition. </p>
<p>One of my entries, which may or may not actually be considered a &#8220;mashup&#8221;, is a Firefox GreaseMonkey script called <a href='http://code.highearthorbit.com/greaseroute/'>GreaseRoute</a> that creates map and route icons for an <a href='http://microformats.org'>Microformat</a> formatted <a href='http://microformats.org/wiki/adr'>adr</a> or <a href='http://microformats.org/wiki/geo'>geo</a> locations. These are often used in an <a href='http://microformats.org/wiki/hcard'>hcard</a>.</p>
<p>One of the cooler parts is that the extension automatically determines the location of the person viewing the page. Using the <a href='http://hostip.info'>HostIP</a> IP-to-Location database, the user&#8217;s location is automatically entered as the starting location. So when a user is viewing the webpage of, for example, a store or business, they can click the &#8220;route&#8221; link and get turn-by-turn directions to that location. No more copy &#038; pasting street/city/state to a form or asking the person next to you &#8220;where are we?&#8221;</p>
<p><a href='http://microformats.org'>Microformats</a> are a stepping stone on the way to the semantic web. They are a simple way to encode useful information for viewing and mining by users and other applications (ala mashups).</p>
<h3>Example adr</h3>
<p>The proper format of the <em>adr</em> is as follows:</p>
<pre>
&lt;div class=&quot;adr&quot;&gt;
 &lt;div class=&quot;street-address&quot;&gt;1517 N. Main St.&lt;/div&gt;
 &lt;div class=&quot;extended-address&quot;&gt;Box 203&lt;/div&gt;
 &lt;span class=&quot;locality&quot;&gt;Royal Oak&lt;/span&gt;,
 &lt;span class=&quot;region&quot;&gt;MI&lt;/span&gt;
 &lt;span class=&quot;postal-code&quot;&gt;48067&lt;/span&gt;
 &lt;div class=&quot;country-name&quot;&gt;US&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>which will then be displayed as:</p>
<div class="adr">
<div class="street-address">1517 N. Main St.</div>
<div class="extended-address">Box 203</div>
<p> <span class="locality">Royal Oak</span>,<br />
 <span class="region">MI</span><br />
 <span class="postal-code">48067</span></p>
<div class="country-name">US</div>
</div>
<h3>Example geo</h3>
<p>Instead of an address, one can instead just encode the latitude and longitude:</p>
<div class="geo">
<abbr class="latitude" title="37.408183">N 37° 24.491</abbr><br />
<abbr class="longitude" title="-122.13855">W 122° 08.313</abbr>
</div>
<h2>The Result</h2>
<p><a href='http://code.highearthorbit.com/greaseroute/'>GreaseRoute</a> has 2 version, the <em>lite</em> version and the <em>embed</em> version. The <em>lite</em> version displays a map and route icon next to the addresses found on the webpage:</p>
<p><img src='http://code.highearthorbit.com/greaseroute/FlockhCard.png' align='right' hspace='5px;' vspace='5px'/></p>
<p>The <em>embed</em> version displays a &#8220;route&#8221; link. When clicked, a pop-up map is displayed between the users location and the encoded address. </p>
<p>Give <a href='http://code.highearthorbit.com/greaseroute/'>GreaseRoute</a> a try and let me know what you think.</p>
<p>You can also go over to <a href='http://userscripts.org'>Userscripts.org</a>, the GreaseMonkey script repository, and rate them and leave comments.</p>
<ul>
<li><a href='http://userscripts.org/scripts/show/4017'>UserScripts.org: GreaseRoute</a></li>
<li><a href='http://userscripts.org/scripts/show/4018'>UserScripts.org: GreaseRouteEmbed</a></li>
<li><a href='http://userscripts.org/scripts/show/4019'>UserScripts.org: MapThis!</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/greaseroute-mapping-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating inline (embedded) PNG images</title>
		<link>http://highearthorbit.com/creating-inline-embedded-png-images/</link>
		<comments>http://highearthorbit.com/creating-inline-embedded-png-images/#comments</comments>
		<pubDate>Sun, 23 Apr 2006 14:55:53 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Open-Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/creating-inline-embedded-png-images/</guid>
		<description><![CDATA[Sometimes it&#8217;s necessary, or nice, to be able to directly embed an image in code. Like a modern form of ASCII art, you then don&#8217;t have to distribute icons and images with your source, because the image is in the source itself. The method uses Base64 encoding. See the RFC for Data URI.

&#8220;Base64&#8243; format used [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s necessary, or nice, to be able to directly embed an image <em>in code</em>. Like a modern form of ASCII art, you then don&#8217;t have to distribute icons and images with your source, because the image is in the source itself. The method uses Base64 encoding. See the <a href='http://www.ietf.org/rfc/rfc2397.txt'>RFC for Data URI</a>.</p>
<blockquote><p>
&#8220;Base64&#8243; format used by MIME-encoded documents such as electronic mail messages with embedded images and audio files.
</p></blockquote>
<p>To convert a PNG (for example) image to Base64, you will need some utility. <a href='http://www.fourmilab.ch/webtools/base64/'>base64</a> is an open-source converter that does just this. </p>
<p>Do the configure, compile jig:</p>
<pre>
$ ./configure
$ make
$ sudo make install
</pre>
<p>Then encode your image:<br />
<code><br />
base64 -e my_image.png my_image.png.base64<br />
</code></p>
<p>Open the <code>my_image.png.base64</code> file in a text editor and then copy it into your code. An example is shown below, written in Javascript. </p>
<p><code></p>
<pre>
const png_image_src = 'data:image/png;base64,'+
'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAANbY1E9YMgAAABl0' +
'RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGAUExURcDYv1C8WdPrtIDAeWqk' +
'Oqnd2VLWaOX0x7ftwZzZlIjGxr7gxanLkdfu1FumybHSsJ3Cutbyx4S9fm2paMrq0Lfo1L/a' +
'o6PHiozL11aZJpnW2oG0ZLTcm5zjvovbvM3qtcror2q5vUaIRHLGZWWkR0aQGSR/BYy5baHY' +
'imrbd/z+/HO9bPb69m29xHy8c2OeMUGJPZDThZPPi3ivdGazzZbBgCuCEd3x2jaICs7ksqLZ' +
'mTp/N6zwtWu/YLDWvZHHeqLS0affzKfvsWDYpn7CvJHJh0+cSGWbY6PQka/Xkvj894W2a4DQ' +
'qIrDhF+hQ8fexJDN24PYgYGzWnXJy6zXpp3Fm5jCg37NdI++dWejWmCwVnSrT6nuyTuLELvh' +
'pV2gO6DSwI3qnd3wv6rQxK/fz1OZxrTvtaLim3rRr+bv5TuCN+jw557FiK7NlWzRkHDGhHLd' +
'fnHWmm2zx7Xe1m21zW65z9Ts0HTHaHrGb3vJb3yvVbTaxVGUTITLtV6w0////94DUpYAAACA' +
'dFJOU///////////////////////////////////////////////////////////////////' +
'////////////////////////////////////////////////////////////////////////' +
'//////////////////////////////8AOAVLZwAAAQxJREFUeNpiqAcCc87wcuVKTl4Qm6G+' +
'XstKOU6eu9ouxNbICySgZajBzluWUuzgkOyqpwMUsNJIEuQVYWUNkOCysxeqZzBXZk+z4RCV' +
'kiopquVUcPNn4JSRd4oRkZAwUSwsKPAQN2YIZ0pPFBUpNQnWZGNj0xOrYShPCtSUdeTTlXNm' +
'0WcUtjRgUE4Kz5Plq0vVzWAJkoy0zGKokDeU4+JjYWHRr+KJVhVTYjDylMn34WPJzeXhiRBX' +
'sXBnKIti0tZW1M9VV/eWlg6LV2Oo943wZHaR5BEXz/EOUzHTYajXEfZWSJBUVY2NN1UxywR5' +
'TsfYIFRAQIDfws8sG+xbICGsZG2tpKamBWQDBBgAU049f2kd9aAAAAAASUVORK5CYII=';

var my_link = document.createElement('a');
my_link.title = "Go to example.com"
my_image = document.createElement('img');
my_image.src = png_image_src;
route_image.border = 0;
my_link.href  = "http://example.com";
my_link.appendChild(my_image);

document.body.insertBefore(my_link, document.body.lastChild);
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/creating-inline-embedded-png-images/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Javascript XML parsing for GML and you</title>
		<link>http://highearthorbit.com/javascript-xml-parsing-for-gml-and-you/</link>
		<comments>http://highearthorbit.com/javascript-xml-parsing-for-gml-and-you/#comments</comments>
		<pubDate>Sun, 23 Apr 2006 14:11:15 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/javascript-xml-parsing-for-gml-and-you/</guid>
		<description><![CDATA[You find the need to determine the locations of your visitors, and you wonder how to do this? Surely it&#8217;s impossible. Alas, it is not. Services like HostIP provide the ability to locate your users given their IP address. The slick way to do this is via javascript. Unfortunately, the HostIP API doesn&#8217;t provide a [...]]]></description>
			<content:encoded><![CDATA[<p>You find the need to determine the locations of your visitors, and you wonder how to do this? Surely it&#8217;s impossible. Alas, it is not. Services like <a href="http://hostip.info">HostIP</a> provide the ability to locate your users given their IP address. The slick way to do this is via javascript. Unfortunately, the HostIP API doesn&#8217;t provide a <a href='http://www.json.org/'>JSON</a> interface.</p>
<p>But of course, the response is in XML, so you&#8217;re also wondering how to parse this XML response for something meaningful? The answer is the <code>DOMParser</code> and namespaces. There is a really nice function, <code>getElementsByTagNameNS</code> that allows you to parse out elements given a namespace. I kept trying <code>getElementsByTagNameNS("gml","name")</code>, which didn&#8217;t work. The answer seems to be that you need to include a valid uri for the namespace.</p>
<p><code></p>
<pre>
var dom = new DOMParser ( ) .parseFromString ( responseText,
                            "application/xml" ) ;

var location = dom.getElementsByTagNameNS (
   "http://www.opengis.net/gml", "name" ) [1].firstChild.data
    if location == " ( Unknown city ) "
        return "";
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/javascript-xml-parsing-for-gml-and-you/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Publish iCal to Google Calendar</title>
		<link>http://highearthorbit.com/publish-ical-to-google-calendar/</link>
		<comments>http://highearthorbit.com/publish-ical-to-google-calendar/#comments</comments>
		<pubDate>Thu, 13 Apr 2006 21:26:43 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/publish-ical-to-google-calendar/</guid>
		<description><![CDATA[Let me attempt to redeem my prior remarks about Google Calendar by offering this bit of how to publish your iCal (via iCal or Mozilla Sunbird) to Google. This was inspired by How to subscribe to Google Calendar in iCal.
Create your calendar
You have numerous options for creating your calendar: iCal (Mac), Mozilla Sunbird (Mac, Windows, [...]]]></description>
			<content:encoded><![CDATA[<p>Let me attempt to redeem my prior remarks about Google Calendar by offering this bit of how to publish your iCal (via <a href='http://www.apple.com/ical/ '>iCal</a> or <a href='www.mozilla.org/projects/calendar/sunbird.html'>Mozilla Sunbird</a>) to Google. This was inspired by <a href='http://www.tuaw.com/2006/04/13/howto-subscribe-to-a-google-calendar-using-ical/#comments'>How to subscribe to Google Calendar in iCal</a>.</p>
<h3>Create your calendar</h3>
<p>You have numerous options for creating your calendar: <a href='http://www.apple.com/ical/ '>iCal</a> (Mac), <a href='www.mozilla.org/projects/calendar/sunbird.html'>Mozilla Sunbird</a> (Mac, Windows, Linux), <a href='http://sourceforge.net/projects/outlook2ical/'>Outlook2iCal</a> (Windows), etc. </p>
<h3>Setup a public server to host your calendar</h3>
<p>You have several options to publish your iCal calendar:</p>
<ul>
<li><a href='http://www.apple.com/dotmac/'>Apple .Mac</a> provides iCal hosting, but costs $$ (or £, ₪, 圓, ﷼, etc.)</li>
<li><a href='http://www.umdnj.edu/webctweb/design/webdavhowto.html'>Setup WebDav</a> on your own server to host calendars</li>
<li><a href='http://icalx.com'>iCal Exchange</a> is a free calendar sharing host</li>
<li><a href='http://www.macosxhints.com/article.php?story=20051020063242208&#038;query=webdav'>Just FTP/Automator</a> your iCal file to a public server</li>
</ul>
<h3>Publish your calendar</h3>
<p>Using one of the prescribed methods above, you will then want to actually publish your calendar to the host (or upload via FTP/SSH/SFTP/carrier pigeon on 5.25&#8243; floppy disk). You can turn on &#8220;Publish Changes Automatically&#8221; to have your changes on your computer automatically uploaded to Google Calendar.</p>
<h3>Subscribe to your calendar in Google Calendar</h3>
<p>Do the following:</p>
<ol>
<li>Manage Calendars</li>
<li>then under &#8220;Other Calendars&#8221;, click &#8220;Add calendar&#8221;</li>
<li>Fill in the URL of your published calendar &#8211; this is probably supplied by the hosting server (like iCal Exchange, .Mac, or you can figure it out for your own server)</li>
<li>Click &#8220;Ok&#8221; and wait a little bit for it to be uploaded</li>
</ol>
<p><img src='http://highearthorbit.com/wp-images/AddCalendar.jpg' alt='Add Calendar'  hspace='5px' vspace='5px'/></p>
<p><img src='http://highearthorbit.com/wp-images/Subscribe.jpg' alt='Subscribe to the Calendar'  hspace='5px' vspace='5px'/></p>
<h3>Bask in the warming, glowing warmth&#8230;</h3>
<p>You&#8217;re now done and have a Google Calendar version of your local iCal calendar. Unfortunately, at this point, Google Calendar doesn&#8217;t let you edit this &#8220;public&#8221; calendar, though you can add events from this calendar to one of your Google Calendar calendars (if that makes sense, you&#8217;re astute). Now you can just publish when you&#8217;ll be available to stop at the local pub for a brew!</p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/publish-ical-to-google-calendar/feed/</wfw:commentRss>
		<slash:comments>62</slash:comments>
		</item>
		<item>
		<title>Spatial programming with Ruby on Rails</title>
		<link>http://highearthorbit.com/spatial-programming-with-ruby-on-rails/</link>
		<comments>http://highearthorbit.com/spatial-programming-with-ruby-on-rails/#comments</comments>
		<pubDate>Mon, 20 Feb 2006 01:50:20 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Geolocation]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/spatial-programming-with-ruby-on-rails/</guid>
		<description><![CDATA[Many of my projects employ a spatial aspect. I am fascinated by location, context, community, and of course, the technology that drives this all. I created my travelogue a while ago, but it&#8217;s rather dated, buggy, and not fun to maintain or update since it&#8217;s all written in PHP as I was learning PHP.
I&#8217;ve really [...]]]></description>
			<content:encoded><![CDATA[<p>Many of my projects employ a spatial aspect. I am fascinated by location, context, community, and of course, the technology that drives this all. I created my <a href="http://highearthorbit.com/projects/location">travelogue</a> a while ago, but it&#8217;s rather dated, buggy, and not fun to maintain or update since it&#8217;s all written in PHP as I was learning PHP.</p>
<p>I&#8217;ve really gotten &#8220;rolling with rails&#8221; (pun intended). One of the factors that really excites many developers is an active community. This can be seen by observing the Mac community (hyperlink any number of weblogs, fan sites, howtos, books, et al. here), car clubs, kennel clubs, etc. Ruby and Rails are both pumping out huge numbers of plugins, add-ons, and howtos that further fuels the fire.</p>
<p>However, there aren&#8217;t currently any good spatial libraries or support within RoR. Specifically, I would like to store general geometry information (areas, points, lines) in a database, create the model in Rails, and then query the model with code like: <code>@user.get_within_radius(:users, 50)</code>.</p>
<h2>Databases and GIS</h2>
<p>My biggest difficulty is that my shared host (<a href='http://dreamhost.com'>Dreamhost</a>) does not provide PostgreSQL databases, only MySQL. As anyone in the GIS field knows, PostGIS, an extension module for PostgreSQL is <em>the</em> requirement for proper spatial database storage and retrieval. Instead of storing locations as a pair of <code>float</code>s, true geometry in the form of <code>POINT</code>, <code>POLYGON</code>, <code>CURVE</code>, and others are used. </p>
<p><a href='http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html'>MySQL Spatial Extensions</a> are began to emerge in MySQL 4.1. However, as <a href='http://dev.mysql.com/tech-resources/articles/4.1/gis-with-mysql.html'>this article on GIS and Spatial Extensions with MySQL</a> points out, many of the core functions are missing (most notably <code>Distance()</code>). This is true even in the current MySQL 5.0. The result is having to do more complex queries to get distance information:</p>
<pre>
SELECT
  c.cab_driver,
  ROUND(GLength(LineStringFromWKB(LineString(AsBinary(c.cab_loc),
                                             AsBinary(a.address_loc)))))
    AS distance
FROM cab c, address a
WHERE a.address = 'Foobar street 110'
ORDER BY distance ASC LIMIT 1;
</pre>
<p>In the meantime, there are several stop-gap solutions. <a href='http://glytch.org/blog/2006/01/locationrb.html'>Bryan Wood (glytch.com)</a> put together a Ruby library file that provides a small number spatial operation utilities, and is useful for operating on the &#8220;simple database scheme&#8221; of a <code>latitude, longitude</code> pair of <code>float</code> columns. The operations are performed by doing a simple SQL query where the latitude and longitude are within max/min bounds. This can&#8217;t handle radius or spherical operations quickly, but is good for a rough estimate. </p>
<p>For an actual spherical measurement, you can do the following in your ruby code (via <a href='http://www.geocodeamerica.com/home/proximity'>GeocodeAmerica</a>):</p>
<blockquote>
<pre>
@places = Place.find_by_sql ["select p.* from places p where
     ((3963.0 * acos(sin(p.latitude/57.2958) *
       sin(?/57.2958) +  cos(p.latitude/57.2958) * cos(?/57.2958) *
        cos(?/57.2958 - p.longitude/57.2958))) < ?)",
        lat, lat, lon, distance]
</pre>
</pre>
</blockquote>
<h2>Extending Ruby on Rails</h2>
<p>A better solution would be to develop a model that provides a GIS interface to a PostGIS or other OGC-style database. This requires <a href='http://www.numenorean.net/blog/archives/2005/12/howto_get_ruby.html'>extending the Ruby on Rails model to arbitrary column data types</a>, and then providing the data types as getters/setters. </p>
<p>Given the SQL create cod:</p>
<blockquote>
<pre>
CREATE TABLE address (
  address CHAR(80) NOT NULL,
  address_loc POINT NOT NULL,
  PRIMARY KEY(address),
  SPATIAL KEY(address_loc)
);
</pre>
</blockquote>
<blockquote>
<pre>
class Address < ActiveRecord::Base
        def address_loc=(textrepresentation)
           write_attribute(:address_loc,
           Address.find_by_sql(["SELECT GeomFromText(?)
as value", textrepresentation]).first.value)
        end

        def address_loc
          Address.find_by_sql(["SELECT AsText(address_loc) as value
FROM addresses WHERE id = ?", id]).first.value
        end
end
</pre>
</pre>
</blockquote>
<h2>Geocoding</h2>
<p><a href='http://en.wikipedia.org/wiki/Geocoding'>Geocoding</a> is the act of converting a location name (major name, street address, etc.) into latitude and longitude (or whatever your preferred numerical location representation may be). </p>
<h3>Ruby Geocoding Resources</h3>
<ul>
<li><a href='http://amit.chakradeo.net/2005/11/04/yahoo-geocoding-in-ruby/'>Geocoding Ruby function with Yahoo!</a></li>
<li><a href='http://habtm.com/articles/2005/06/13/geocoding-with-geocoder-us-and-ruby'>Geocoding with geocoder.us</a></li>
<li><a href='http://rubyforge.org/projects/geocoder/'>Geocoder library at RubyForge</a></li>
<li><a href='http://www.geocodeamerica.com/home/proximity'>GoogleMaps and Proximity</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/spatial-programming-with-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Floating text below an absolutely positioned div</title>
		<link>http://highearthorbit.com/floating-text-below-an-absolutely-positioned-div/</link>
		<comments>http://highearthorbit.com/floating-text-below-an-absolutely-positioned-div/#comments</comments>
		<pubDate>Mon, 23 Jan 2006 02:41:55 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://highearthorbit.com/floating-text-below-an-absolutely-positioned-div/</guid>
		<description><![CDATA[This is probably odd to most people, but for a project I had to put a caption below an image on a webpage. But I wanted the image to be fixed in position and the caption would automatically flow and remain centered no matter how long the string was. I knew the size of the [...]]]></description>
			<content:encoded><![CDATA[<p>This is probably odd to most people, but for a project I had to put a caption below an image on a webpage. But I wanted the image to be fixed in position and the caption would automatically flow and remain centered no matter how long the string was. I knew the size of the image (original div) but not the text string.</p>
<p><img src='http://highearthorbit.com/wp-images/CSSCaption.jpg' alt='CSS Caption' align='right' hspace='10px' vspace='10px'/>The trick lies in embedding the caption div within another div. Then the outer div should have a <code>left:</code> equal to half the image (or other div)&#8217;s width. The relevant CSS is:</p>
<pre><code>
outercaption {
	position: relative;
	left: 13px;
	}
.caption {
	text-align: center;
	position: relative;
	left: -50%;
	white-space: nowrap;
	}
</code></pre>
<p>Which will work with this HTML code. </p>
<pre><code>
<div class="outer">
<div class="imagecontainer">
<div class="image"></div>
<div class="outercaption">
<div id="replaceCaption" class="caption">Short</div>
</div>
</div>
</div>

</code></pre>
<p><a href='http://highearthorbit.com/projects/CSSTest.html'>Here is an example</a>. You can even put in your own text to see how it is dynamically sized. </p>
]]></content:encoded>
			<wfw:commentRss>http://highearthorbit.com/floating-text-below-an-absolutely-positioned-div/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

