<?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>Seaside &#187; I talk process</title> <atom:link href="http://blog.blackwhale.at/category/i-talk-process/feed/" rel="self" type="application/rss+xml" /><link>http://blog.blackwhale.at</link> <description>A weblog by Blackwhale about design, code and random stuff we care about.</description> <lastBuildDate>Tue, 10 Aug 2010 15:29:48 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>Postgis and Rails on Snow Leopard</title><link>http://blog.blackwhale.at/2010/05/postgis-and-rails-on-snow-leopard/</link> <comments>http://blog.blackwhale.at/2010/05/postgis-and-rails-on-snow-leopard/#comments</comments> <pubDate>Sun, 23 May 2010 11:52:47 +0000</pubDate> <dc:creator>Johannes</dc:creator> <category><![CDATA[I talk process]]></category> <category><![CDATA[geodata]]></category> <category><![CDATA[geotagging]]></category> <category><![CDATA[location aware]]></category> <category><![CDATA[postgres]]></category> <category><![CDATA[rails]]></category><guid
isPermaLink="false">http://blog.blackwhale.at/?p=573</guid> <description><![CDATA[So you decided to work with geo data within your rails application? To do so, some additional gems are required and over here you will find a simple example using rails with an underlying postgres database to store your geo data. First download Postgres and PostGIS from here and the additional frameworks GEOS and PROJ [...]]]></description> <content:encoded><![CDATA[<p>So you decided to work with geo data within your rails application? To do so, some additional gems are required and over here you will find a simple example using rails with an underlying postgres database to store your geo data.</p><p>First download Postgres and PostGIS from <a
href="http://www.kyngchaos.com/software:postgres">here</a> and the additional frameworks GEOS and PROJ from <a
href="http://www.kyngchaos.com/software/frameworks">here</a> and install them in the following order</p><ul><li>PostgreSQL</li><li>GEOS</li><li>PROJ</li><li>PostGIS</li></ul><p>After you ensured you have a working PostgreSQL (default install directory is  <code>/usr/local/pgsql/</code>) and PostGIS, continue to the next steps. <em>Note: If you get errors on non-existing role, use the option <code>-U postgres</code> for the following commands.</em></p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">createdb <span style="color: #7a0874; font-weight: bold;">&#91;</span>yourdatabase<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div><p>The next step before creating the PostGIS database is to enable PLSQL.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">createlang plpgsql <span style="color: #7a0874; font-weight: bold;">&#91;</span>yourdatabase<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div><p>Now load the PostGIS object and function definitions (usually located in <code>/usr/local/pgsql/share/contrib</code>).</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">psql <span style="color: #660033;">-d</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>yourdatabase<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">-f</span> postgis.sql</pre></div></div><p>For a complete set of EPSG coordinate system definition identifiers, you can also load the spatial_ref_sys.sql definitions file and populate the spatial_ref_sys table. This will permit you to perform ST_Transform() operations on geometries.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">psql <span style="color: #660033;">-d</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>yourdatabase<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">-f</span> spatial_ref_sys.sql</pre></div></div><p>After that your postgres and postgis installation is complete. Now we can configure our rails environment. First of all install the <strong>GeoRuby</strong> and <strong>Spatial Adapter</strong> gem.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> GeoRuby
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> spatial_adapter</pre></div></div><p>or simply add following lines to your <code>environment.rb</code></p><div
class="wp_syntax"><div
class="code"><pre class="ruby" style="font-family:monospace;">config.<span style="color:#9900CC;">gem</span> <span style="color:#996600;">&quot;GeoRuby&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:lib</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;geo_ruby&quot;</span>
config.<span style="color:#9900CC;">gem</span> <span style="color:#996600;">&quot;spatial_adapter&quot;</span></pre></div></div><p>and run</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> rake gems:<span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div><p>From now on, you are ready to use special geo column types (like <code>point, line string, polygon, ...</code>) within your database and also a corresponding active record object types. For example you will be able to create your database tables like the following</p><div
class="wp_syntax"><div
class="code"><pre class="ruby" style="font-family:monospace;">create_table <span style="color:#ff3333; font-weight:bold;">:places</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>t<span style="color:#006600; font-weight:bold;">|</span>
   t.<span style="color:#9900CC;">point</span> <span style="color:#ff3333; font-weight:bold;">:location</span>, <span style="color:#ff3333; font-weight:bold;">:null</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">false</span>, <span style="color:#ff3333; font-weight:bold;">:srid</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">4326</span>
   t.<span style="color:#CC0066; font-weight:bold;">string</span> <span style="color:#ff3333; font-weight:bold;">:address</span>
   t.<span style="color:#9900CC;">timestamps</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div><p>and within your application you are able to work with geo data as you can see in this code snippet</p><div
class="wp_syntax"><div
class="code"><pre class="ruby" style="font-family:monospace;">place = Place.<span style="color:#9900CC;">new</span> <span style="color:#006600; font-weight:bold;">&#40;</span>
  <span style="color:#ff3333; font-weight:bold;">:location</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> Point.<span style="color:#9900CC;">from_x_y</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1.0</span>, <span style="color:#006666;">2.0</span>, <span style="color:#006666;">4326</span><span style="color:#006600; font-weight:bold;">&#41;</span>,
  <span style="color:#ff3333; font-weight:bold;">:address</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;My home is my castle&quot;</span>
<span style="color:#006600; font-weight:bold;">&#41;</span>
...
<span style="color:#9900CC;">place</span> = Place.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:all</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">first</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> place.<span style="color:#9900CC;">location</span>.<span style="color:#9900CC;">x</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> place.<span style="color:#9900CC;">location</span>.<span style="color:#9900CC;">y</span>
...</pre></div></div><p>Enjoy,<br
/> J.</p><p>References:<br
/> [1] Using Postgis, <a
href="http://postgis.refractions.net/docs/ch04.html" target="_blank">http://postgis.refractions.net/docs/ch04.html</a><br
/> [2] spatial_adapter, <a
href="http://github.com/fragility/spatial_adapter" target="_blank">http://github.com/fragility/spatial_adapter</a><br
/> [3] GeoRuby, <a
href="http://georuby.rubyforge.org/georuby-doc/index.html" target="_blank">http://georuby.rubyforge.org/georuby-doc/index.html</a></p> ]]></content:encoded> <wfw:commentRss>http://blog.blackwhale.at/2010/05/postgis-and-rails-on-snow-leopard/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Android Firmware Upgrade 1.5 on MacOS</title><link>http://blog.blackwhale.at/2009/06/android-firmware-upgrade-1-5-on-macos/</link> <comments>http://blog.blackwhale.at/2009/06/android-firmware-upgrade-1-5-on-macos/#comments</comments> <pubDate>Tue, 30 Jun 2009 18:51:22 +0000</pubDate> <dc:creator>Johannes</dc:creator> <category><![CDATA[Android]]></category> <category><![CDATA[I talk process]]></category><guid
isPermaLink="false">http://blog.blackwhale.at/?p=115</guid> <description><![CDATA[After finally getting a G1 from T-Mobile for testing purposes I quickly realized it is pretty useless if you want to do edge development because you are not allowed to upgrade the latest firmware (at least not straightforward because you need a signed version from T-Mobile). So I ordered an Android Dev Phone 1 which [...]]]></description> <content:encoded><![CDATA[<p>After finally getting a G1 from T-Mobile for testing purposes I quickly realized it is pretty useless if you want to do edge development because you are not allowed to upgrade the latest firmware (at least not straightforward because you need a signed version from T-Mobile). So I ordered an Android Dev Phone 1 which arrived incredibly fast and came in an incredibly unimaginative box that smelled like gummy bears <img
src='http://blog.blackwhale.at/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p><p>After unboxing I started the upgrade process, and as there of course were some minor complications I will outline the detailed steps here.</p><p><span
id="more-115"></span></p><p>1. Go to the <a
href="http://www.htc.com/www/support/android/adp.html">HTC Page</a> and download the newest Radio and Recovery Image, place them wherever you want just be sure they stay the zip they are meant to be.</p><p>2. Connect your Android Phone to your Mac and do not mount the SD Card.</p><p>3. Check if your device is connected by using</p><p>adb devices</p><p>4. Copy the Radio image to the SD Card by using</p><p>adb push &lt;radioimagename&gt;.zip /sdcard/update.zip</p><p>5. Be sure it is copied by using</p><p>adb shell sync</p><p>after this is returned everything is done.</p><p>The next step is to turn your Phone of by holding down the power button. After its turned of hold down the home button and turn it on again. Some moments after the android sign a ! accompanied by a triangle should appear now your are in recovery mode. Slide out the keyboard and press ALT + L, you now should see the recovery console. Now press ALT + S and you should see some command verifying the package etc&#8230; and a progress bar. After that press the Home and Back button (just press do not hold) to reboot the device, note only if you do exactly so the new radio image will be installed. It will display another Image (arrow and a chip) and reboot the system to normal mode after it is done.</p><p>Now you are half way through just repeat the steps above with the Recovery Image and you are done <img
src='http://blog.blackwhale.at/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://blog.blackwhale.at/2009/06/android-firmware-upgrade-1-5-on-macos/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 10/18 queries in 0.002 seconds using disk

Served from: blog.blackwhale.at @ 2010-09-05 03:51:25 -->