<?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/"
	>

<channel>
	<title>Mateusz Loskot</title>
	<atom:link href="http://mateusz.loskot.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://mateusz.loskot.net</link>
	<description>Into the Source of Software for Geospatial</description>
	<pubDate>Sun, 28 Jun 2009 20:49:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spatial Relations for Dummies</title>
		<link>http://mateusz.loskot.net/2009/06/28/spatial-relations-for-dummies/</link>
		<comments>http://mateusz.loskot.net/2009/06/28/spatial-relations-for-dummies/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 20:45:26 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[books]]></category>

		<category><![CDATA[geos]]></category>

		<category><![CDATA[gis]]></category>

		<category><![CDATA[book]]></category>

		<category><![CDATA[dale lutz]]></category>

		<category><![CDATA[dummies]]></category>

		<category><![CDATA[howto]]></category>

		<category><![CDATA[jo]]></category>

		<category><![CDATA[lutz]]></category>

		<category><![CDATA[relation]]></category>

		<category><![CDATA[safe]]></category>

		<category><![CDATA[safe software]]></category>

		<category><![CDATA[spatial]]></category>

		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=708</guid>
		<description><![CDATA[My friend Jo asked on GEOS mailing list for approachable explanation of spatial relations and Dale Lutz from Safe Software suggested something I&#8217;ve not came across myself before and what (in generalised form) I&#8217;d consider as a great idea for&#8230;a book really :-)

]]></description>
			<content:encoded><![CDATA[<p>My friend <a href="http://twitter.com/doublebyte">Jo</a> <a href="http://lists.osgeo.org/pipermail/geos-devel/2009-June/004238.html">asked</a> on <a href="http://trac.osgeo.org/geos/">GEOS</a> <a href="http://lists.osgeo.org/mailman/listinfo/geos-devel">mailing list</a> for approachable explanation of <a href="http://en.wikipedia.org/wiki/Spatial_relation">spatial relations</a> and <a href="http://www.dalelutz.com/">Dale Lutz</a> from <a href="http://www.safe.com/">Safe Software</a> suggested something I&#8217;ve not came across myself before and what (in generalised form) I&#8217;d consider as a great idea for&#8230;a book really :-)</p>
<p><a href="http://www.fmepedia.com/index.php/SpatialRelator_For_Dummies"><img src="http://www.fmepedia.com/attachments//SpatialRelator_For_Dummies/smSpatialRelatorForDummies.jpg" alt="Spatial Relation for Dummies" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/28/spatial-relations-for-dummies/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Logic</title>
		<link>http://mateusz.loskot.net/2009/06/25/logic/</link>
		<comments>http://mateusz.loskot.net/2009/06/25/logic/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 14:35:19 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[author]]></category>

		<category><![CDATA[fun]]></category>

		<category><![CDATA[egg]]></category>

		<category><![CDATA[inference]]></category>

		<category><![CDATA[logic]]></category>

		<category><![CDATA[programmer]]></category>

		<category><![CDATA[reasoning]]></category>

		<category><![CDATA[sausage]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=700</guid>
		<description><![CDATA[My wife asked me: Buy sausages, if you&#8217;ll find eggs, buy 10. What happens next?
Option #1:
if eggs >= 10 then buy(sausages, eggs=10);
Option #2:
if sausages > 0 then buy(sausages);
if eggs >= 10 then buy(eggs, 10);
Option #3
buy(sausages);
if eggs >= 10 then buy(eggs, 10);
The 3rd option is dangerous one because it could end up with never-ending run in [...]]]></description>
			<content:encoded><![CDATA[<p>My wife asked me: <em>Buy sausages, if you&#8217;ll find eggs, buy 10</em>. What happens next?</p>
<p>Option #1:</p>
<pre><code>if eggs >= 10 then buy(sausages, eggs=10);</code></pre>
<p>Option #2:</p>
<pre><code>if sausages > 0 then buy(sausages);
if eggs >= 10 then buy(eggs, 10);</code></pre>
<p>Option #3</p>
<pre><code>buy(sausages);
if eggs >= 10 then buy(eggs, 10);</code></pre>
<p>The 3rd option is dangerous one because it could end up with never-ending run in the city looking for sausages, never buying eggs and never coming back home.</p>
<p> &#8230;and more. Why?</p>
<p>Asking me to make shopping, my wife did not stick to <a href="http://en.wikipedia.org/wiki/Logic">the principles of valid inference and correct reasoning</a>. That&#8217;s the reason why not everybody can be a programmer :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/25/logic/feed/</wfw:commentRss>
		</item>
		<item>
		<title>(in)dependency</title>
		<link>http://mateusz.loskot.net/2009/06/25/independency/</link>
		<comments>http://mateusz.loskot.net/2009/06/25/independency/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 09:32:58 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[author]]></category>

		<category><![CDATA[fun]]></category>

		<category><![CDATA[courage]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[independence]]></category>

		<category><![CDATA[nda]]></category>

		<category><![CDATA[personal]]></category>

		<category><![CDATA[philosophy]]></category>

		<category><![CDATA[professional]]></category>

		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=696</guid>
		<description><![CDATA[In times when independence is a deadly sin and in times of Google-like NDA-ization of nearly all professional activities of an individual&#8230;
&#8230;it&#8217;s quite extra-ordinary to have enough courage to shout out:
I don&#8217;t speak for my employer. For example, our site is one of those Flashy Internet dead-ends I&#8217;d never enter. See? I don&#8217;t speak for [...]]]></description>
			<content:encoded><![CDATA[<p>In times when independence is a deadly sin and in times of <a href="http://www.google.co.uk/search?q=google+nda">Google-like NDA-ization</a> of nearly all professional activities of an individual&#8230;</p>
<p>&#8230;it&#8217;s quite extra-ordinary to have enough <a href="http://cscott.net/Activism/google-nda-amendment.pdf">courage</a> to <a href="http://yosefk.com/about.html">shout out</a>:</p>
<blockquote><p>I don&#8217;t speak for my employer. For example, our <a href="http://mobileye.com/">site</a> is one of those Flashy Internet dead-ends I&#8217;d never enter. See? I don&#8217;t speak for them.</p></blockquote>
<p>or may be no courage is needed to criticize bad design ;-) BTW, it must be an old critique by <a href="http://yosefk.com/about.html">Yossi</a>. Now their website looks good.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/25/independency/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OSGIS UK 2009 on Flickr</title>
		<link>http://mateusz.loskot.net/2009/06/24/osgis-uk-2009-on-flickr/</link>
		<comments>http://mateusz.loskot.net/2009/06/24/osgis-uk-2009-on-flickr/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 00:23:47 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[author]]></category>

		<category><![CDATA[events]]></category>

		<category><![CDATA[fun]]></category>

		<category><![CDATA[gis]]></category>

		<category><![CDATA[osgeo]]></category>

		<category><![CDATA[conference]]></category>

		<category><![CDATA[event]]></category>

		<category><![CDATA[flickr]]></category>

		<category><![CDATA[nottingham]]></category>

		<category><![CDATA[osgis]]></category>

		<category><![CDATA[osgis 2009]]></category>

		<category><![CDATA[osgis uk]]></category>

		<category><![CDATA[osgis uk 2009]]></category>

		<category><![CDATA[photo]]></category>

		<category><![CDATA[pictures]]></category>

		<category><![CDATA[report]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=684</guid>
		<description><![CDATA[I&#8217;ve just finished uploading photos taken on the OSGIS UK 2009 in Nottingham, so here is the set.
I&#8217;ve re-re-re-learned the lesson that light conditions in a conference venue is bad and I should always bring a proper strobe. Otherwise, pictures are dark or very grained (high ISO) or blured (mostly, unless your name is Arnold [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished uploading photos taken on the <a href="http://www.opensourcegis.org.uk/">OSGIS UK 2009</a> in Nottingham, so <a href="http://www.flickr.com/photos/mloskot/sets/72157620410984670/">here is the set</a>.</p>
<p>I&#8217;ve re-re-re-learned the lesson <a href="http://www.dcmag.co.uk/How_to_shoot_well_in_low_light_conditions.YffwKORo39cnPg.html">that light conditions</a> in a conference venue is bad and I should always bring a proper <a href="http://en.wikipedia.org/wiki/Flash_(photography)">strobe</a>. Otherwise, pictures are dark or very grained (high ISO) or blured (mostly, unless your name is <a href="http://en.wikipedia.org/wiki/Arnold_Schwarzenegger">Arnold</a> The Steel Grip). Ah, one more thing, don&#8217;t buy a DSLR with lens included, it simply is a waste of money. <a href="http://en.wikipedia.org/wiki/Pentax_K10D">The kit lens</a> is a piece of @#$%^&#038;!, so just buy a body and then buy a proper (read: expansive) lens from <a href="http://www.flickr.com/cameras/pentax/k10d/">Pentax</a> (or Sigma). <a href="http://www.vimeo.com/1841244">To quote the classics</a>:</p>
<p><em>you are awesome</em><br />
<em>you have awesome camera</em><br />
<em>but it&#8217;s useless</em><br />
<em>without (proper) lens</em></p>
<p>Anyway, it&#8217;s always nice to have some photolog after events, even if the pictures are of bad quality.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/24/osgis-uk-2009-on-flickr/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quick Look and Spotlight plugins for GIS</title>
		<link>http://mateusz.loskot.net/2009/06/23/quick-look-and-spotlight-plugins-for-gis/</link>
		<comments>http://mateusz.loskot.net/2009/06/23/quick-look-and-spotlight-plugins-for-gis/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 22:17:02 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[gis]]></category>

		<category><![CDATA[gui]]></category>

		<category><![CDATA[osx]]></category>

		<category><![CDATA[tools]]></category>

		<category><![CDATA[apple]]></category>

		<category><![CDATA[Bernhard Jenny]]></category>

		<category><![CDATA[finder]]></category>

		<category><![CDATA[gislook]]></category>

		<category><![CDATA[gismeta]]></category>

		<category><![CDATA[Jenny]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[mac]]></category>

		<category><![CDATA[macosx]]></category>

		<category><![CDATA[spotlight]]></category>

		<category><![CDATA[Zurich]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=677</guid>
		<description><![CDATA[I had been thinking about developing something like that since I started to use Mac OS X as my development environment, but I left my Apple boxes at home in PL and now I&#8217;ve switched back to Linux (you simply can&#8217;t forget your roots :-)) . So, the idea has been swapped in the abyss [...]]]></description>
			<content:encoded><![CDATA[<p>I had been thinking about developing something like that since I started to use <a href="http://www.flickr.com/photos/mloskot/2053393609/">Mac OS X</a> as my development environment, but <a href="http://www.flickr.com/photos/mloskot/2053396495/">I left my Apple boxes at home in PL</a> and now I&#8217;ve switched back to <a href="http://www.flickr.com/photos/mloskot/1558750896/">Linux</a> (you simply can&#8217;t forget your roots :-)) . So, the idea has been swapped in the abyss of my mind until I accidentally came across <a href="http://jenny.cartography.ch/gislook/">GISLook</a> five minutes ago:</p>
<blockquote><p>GISLook and GISMeta are plugins for Mac OS X 10.5 that show GIS data in the Finder.</p></blockquote>
<p>These cool-looking plugins were created by <a href="http://jenny.cartography.ch/">Bernhard Jenny</a>.
</p>
<p>I know many GIS users loving products of the <del datetime="2009-06-23T22:17:13+00:00">forbidden</del> fruit, so I&#8217;m spreading the word about these nice looking and, hopefully, well working tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/23/quick-look-and-spotlight-plugins-for-gis/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Twit #OSGIS</title>
		<link>http://mateusz.loskot.net/2009/06/23/twit-osgis/</link>
		<comments>http://mateusz.loskot.net/2009/06/23/twit-osgis/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 00:04:00 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[events]]></category>

		<category><![CDATA[gis]]></category>

		<category><![CDATA[open source]]></category>

		<category><![CDATA[osgeo]]></category>

		<category><![CDATA[amg]]></category>

		<category><![CDATA[conference]]></category>

		<category><![CDATA[event]]></category>

		<category><![CDATA[meeting]]></category>

		<category><![CDATA[nottingham]]></category>

		<category><![CDATA[osgis]]></category>

		<category><![CDATA[osgis2009]]></category>

		<category><![CDATA[osgisuk]]></category>

		<category><![CDATA[osgisuk2009]]></category>

		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=675</guid>
		<description><![CDATA[Search for OSGIS UK 2009 backlog on Twitter
]]></description>
			<content:encoded><![CDATA[<p><a href="https://twitter.com/#search?q=osgis">Search for OSGIS UK 2009 backlog on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/23/twit-osgis/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OSGIS UK 2009 Live</title>
		<link>http://mateusz.loskot.net/2009/06/21/osgis-uk-2009-live/</link>
		<comments>http://mateusz.loskot.net/2009/06/21/osgis-uk-2009-live/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 20:06:36 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[events]]></category>

		<category><![CDATA[gis]]></category>

		<category><![CDATA[open source]]></category>

		<category><![CDATA[osgeo]]></category>

		<category><![CDATA[conference]]></category>

		<category><![CDATA[event]]></category>

		<category><![CDATA[foss4g]]></category>

		<category><![CDATA[live]]></category>

		<category><![CDATA[nottingham]]></category>

		<category><![CDATA[osgis]]></category>

		<category><![CDATA[stream]]></category>

		<category><![CDATA[transmission]]></category>

		<category><![CDATA[uk]]></category>

		<category><![CDATA[university]]></category>

		<category><![CDATA[webcast]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=670</guid>
		<description><![CDATA[Tomorrow early morning I&#8217;m leaving to Nottingham to attend the OSGIS UK 2009 conference. It&#8217;s been long time since FOSS4G 2007 and I didn&#8217;t make it to Cape Town last year, so I&#8217;m looking forward to meet FOSS4G and OSGeo folks in UK.
A few minutes ago, Suchith Anand announced there will be live streaming transmission [...]]]></description>
			<content:encoded><![CDATA[<p>Tomorrow early morning I&#8217;m leaving to Nottingham to attend the <a href="http://www.opensourcegis.org.uk/">OSGIS UK 2009</a> conference. It&#8217;s been long time since <a href="http://2007.foss4g.org/">FOSS4G 2007</a> and I didn&#8217;t make it to <a href="http://conference.osgeo.org/index.php/foss4g/2008">Cape Town</a> last year, so I&#8217;m looking forward to meet FOSS4G and OSGeo folks in UK.</p>
<p>A few minutes ago, Suchith Anand <a href="http://lists.osgeo.org/pipermail/discuss/2009-June/005457.html">announced</a> there will be live streaming transmission available from OSGIS sessions. This is cool!</p>
<p>By the way, does anyone remember a kind of pioneer transmission from <a href="http://foss4g2006.org/">FOSS4G 2006</a> in Lausanne? The videos are <a href="http://foss4g2006.org/internalPage.py?pageId=21&#038;confId=1">still linked</a> but seem to be unavailable. Pity. It would be cool to archive them somewhere on <a href="http://conference.osgeo.org/">foss4g.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/21/osgis-uk-2009-live/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OSGeo Tribulum</title>
		<link>http://mateusz.loskot.net/2009/06/20/osgeo-tribulum/</link>
		<comments>http://mateusz.loskot.net/2009/06/20/osgeo-tribulum/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 13:27:10 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[author]]></category>

		<category><![CDATA[osgeo]]></category>

		<category><![CDATA[concern]]></category>

		<category><![CDATA[fair play]]></category>

		<category><![CDATA[foundation]]></category>

		<category><![CDATA[membership]]></category>

		<category><![CDATA[money]]></category>

		<category><![CDATA[participation]]></category>

		<category><![CDATA[pay back]]></category>

		<category><![CDATA[philosophy]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[question]]></category>

		<category><![CDATA[responsibility]]></category>

		<category><![CDATA[sponsorship]]></category>

		<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=658</guid>
		<description><![CDATA[The OSGeo Fundation is driven by volunteer manpower and sponsorship. The OSGeo Foundation is a proxy body that transfers contributions from sponsors to activities initiatives and projects that perform under the umbrella of OSGeo, to the OSGeo members. The OSGeo members (right column) are free to raise funds on their own. Some projects do it [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.osgeo.org/">OSGeo Fundation</a> is driven by <a href="http://wiki.osgeo.org/wiki/Category:OSGeo_Member">volunteer</a> <a href="http://wiki.osgeo.org/wiki/Project_Stats">manpower</a> and <a href="http://www.osgeo.org/sponsorship/opportunities">sponsorship</a>. The <a href="http://www.osgeo.org/content/foundation/about.html">OSGeo Foundation</a> is a proxy body that transfers <a href="http://wiki.osgeo.org/wiki/OSGeo_Budget_2009">contributions</a> from <a href="http://www.osgeo.org/content/sponsorship/sponsors.html">sponsors</a> to <del datetime="2009-06-20T23:13:50+00:00">activities</del> initiatives and projects that perform under the umbrella of OSGeo, to the OSGeo members. The <a href="http://www.osgeo.org/">OSGeo members</a> (right column) are free to raise funds on their own. Some projects do it very well, some don&#8217;t do it at all (and it&#8217;s not any fault, it just happens). However, all participants are eligible to accept OSGeo support in the same way, scale, etc. For instance, all members use <strong>OSGeo brand</strong>, <a href="http://wiki.osgeo.org/wiki/Category:Infrastructure">OSGeo infrastructure</a>, <a href="http://wiki.osgeo.org/wiki/Category:Marketing">OSGeo marketing</a> efforts and many more. The OSGeo Foundation membership is a <a href="http://wiki.osgeo.org/wiki/OSGeo_Mission">value</a>. Period.</p>
<p>Let&#8217;s make it straight. What about reversing the direction of flow of support? Should there be any reason to not to ask projects to support OSGeo Foundation? If a project is well funded by 3rd party organizations, it should be a part of fair play to expect a <em>minimal tribulum</em> paid back to OSGeo. Actually, this mechanism has been included as a part of the <a href="http://wiki.osgeo.org/wiki/Project_Sponsorship">Project Sponsorship</a> program:</p>
<blockquote><p>One quarter of the sponsorship amount will be put into the general OSGeo account for any OSGeo use (such as paying hosting costs, general promotion, etc)</p></blockquote>
<p>Does it apply in case OSGeo member project gets funds through a back door?</p>
<p>There are bills to be paid, there is always a lot of work to get done around OSGeo activities, meaning there are expectations, there are loads of tasks that need to be accomplished in reasonable amount of time, but a limited resources available.</p>
<p>Disclaimer: I was born in <a href="http://en.wikipedia.org/wiki/Polska_Rzeczpospolita_Ludowa">socialistic republic that no longer exists</a>, but it does not mean I believe in socialism or that I&#8217;d like to see OSGeo being converted into communist party and <a href="http://www.osgeo.org/node/185">Tyler</a> flying to <a href="http://en.wikipedia.org/wiki/North_Korea">North Korea</a> with official visit to give <a href="http://pl.wikipedia.org/wiki/Kim_Dzong_Il">Kim</a> a hug.</p>
<p>I believe in <a href="http://www.osgeo.org/content/faq/foundation_faq.html#Participation">joint responsibility and fair play</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/20/osgeo-tribulum/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Crunching overviews</title>
		<link>http://mateusz.loskot.net/2009/06/03/crunching-overviews/</link>
		<comments>http://mateusz.loskot.net/2009/06/03/crunching-overviews/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 10:27:03 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[gdal]]></category>

		<category><![CDATA[gis]]></category>

		<category><![CDATA[open source]]></category>

		<category><![CDATA[postgis]]></category>

		<category><![CDATA[wktraster]]></category>

		<category><![CDATA[dataset]]></category>

		<category><![CDATA[dumping]]></category>

		<category><![CDATA[gdal2wktraster]]></category>

		<category><![CDATA[gdaladdo]]></category>

		<category><![CDATA[japan]]></category>

		<category><![CDATA[loading]]></category>

		<category><![CDATA[overviews]]></category>

		<category><![CDATA[processing]]></category>

		<category><![CDATA[pyramid]]></category>

		<category><![CDATA[raster]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=623</guid>
		<description><![CDATA[Continuing my tale about loading big raster datasets into PostGIS database with WKT Raster extension, I&#8217;d like to post an update about experience with processing overviews.
For testing purposes, I built excessive number of overviews for japan.tif dataset using gdaladdo utility:
$ gdaladdo -r average japan.tif 2 4 8 16 32 64 128
The command above produced 7 [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing <a href="/?p=362">my tale</a> about loading big raster datasets into <a href="http://trac.osgeo.org/postgis/">PostGIS</a> database with <a href="http://trac.osgeo.org/postgis/wiki/WKTRaster">WKT Raster</a> extension, I&#8217;d like to post an update about experience with processing overviews.</p>
<p>For testing purposes, I built excessive number of overviews for <a href="/?p=317">japan.tif</a> dataset using <a href="http://">gdaladdo</a> utility:</p>
<pre>$ gdaladdo -r average japan.tif 2 4 8 16 32 64 128</pre>
<p>The command above produced 7 overviews with the following dimensions:</p>
<pre>$ gdalinfo japan_2_4_8_16_32_128.tif | grep -m 1 Ov
Overviews: 7000x7000, 3500x3500, 1750x1750, 875x875, 438x438, 219x219, 110x110</pre>
<p><span id="more-623"></span></p>
<p>Next, I loaded the whole dataset into <a href="/?p=392">PostGIS and WKT Raster enabled database</a> using <a href="http://trac.osgeo.org/postgis/browser/spike/wktraster/scripts">gdal2wktraster</a> utility written in <a href="http://www.python.org/">Python</a> and available to download from the <a href="http://svn.osgeo.org/postgis//spike/wktraster/">WKT Raster repository</a>:</p>
<pre>$ gdal2wktraster.py -r japan.tif -t japan_rb_128 \
  -o japan_rb_128.sql \
  --index --srid 4326 -k -m 128x128 -O -M -v</pre>
<p>I&#8217;ve invented my favourite convention of naming <a href="http://www.postgresql.org/">database</a> tables and here <em>japan_rb_128</em> remembers what was source dataset (<strong>japan</strong>), that the output table is in <a href="http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking01#RASTER_COLUMNSMetadataTable">regular blocking</a> mode (_<strong>rb</strong>_) and size of block (tile) is 128&#215;128 pixels (_<strong>128</strong>).</p>
<p>You can find meaning of all the switches by displaying usage message:</p>
<pre>$ gdal2wktraster.py -h</pre>
<p>After, literally, <strong>two hours</strong> of crunching <a href="http://en.wikipedia.org/wiki/Japan">Japan</a>, the script ended with nice summary. It tells how many input raster datasets have been processed and how many database tables will be generated after <em>japan_rb_128.sql</em> is loaded into database as wall as how many blocks (tiles) will be loaded into output table as rows:</p>
<pre>------------------------------------------------------------
 Summary of GDAL to WKT Raster processing:
------------------------------------------------------------
Number of processed raster files: 1
List of generated tables (number of tiles):
1	japan_rb_128 (12100)
2	o_2_japan_rb_128 (3025)
3	o_4_japan_rb_128 (784)
4	o_8_japan_rb_128 (196)
5	o_16_japan_rb_128 (49)
6	o_32_japan_rb_128 (16)
7	o_64_japan_rb_128 (4)
8	o_128_japan_rb_128 (1)</pre>
<p>The script generated output file <em>japan_rb_128.sql</em> of size of <strong>1 593 387 714</strong> bytes and it took 2 hours, so it&#8217;s not a bad idea to leave it overnight, as I did yesterday :-) Disk space occupied by this dataset will estimate around 750 MB.</p>
<p>The SQL file with japan.tif dump is ready to load into the database, but first extra table needs to be created for metadata of overviews, it is <a href="http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking01#RASTER_OVERVIEWSMetadataTable">RASTER_OVERVIEWS</a> table:</p>
<pre>CREATE TABLE raster_overviews (
  o_table_catalog character varying(256) NOT NULL,
  o_table_schema character varying(256) NOT NULL,
  o_table_name character varying(256) NOT NULL,
  o_column character varying(256) NOT NULL,
  r_table_catalog character varying(256) NOT NULL,
  r_table_schema character varying(256) NOT NULL,
  r_table_name character varying(256) NOT NULL,
  r_column character varying(256) NOT NULL,
  out_db boolean NOT NULL,
  overview_factor integer NOT NULL,
  CONSTRAINT raster_overviews_pk
  PRIMARY KEY (o_table_catalog, o_table_schema, o_table_name, o_column))</pre>
<p>The RASTER_OVERVIEWS solution was <a href="http://postgis.refractions.net/pipermail/postgis-devel/2009-May/005619.html">proposed</a> by <a href="http://blog.lostinspatial.com/">Martin Daly</a> and officially approved as a part of <a href="http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking01">WKT Raster Specification</a>, however it&#8217;s been decided that:</p>
<blockquote><p>No provision is provided, or suggested, for creating, updating, or deleting overviews.</p></blockquote>
<p>That&#8217;s why the <a href="http://www.postgresql.org/docs/8.3/interactive/sql-createtable.html">CREATE TABLE</a> command needs to be issued manually.</p>
<p>Now, everything is ready to load the data.</p>
<pre>psql -d japan -f japan_rb_128.sql</pre>
<p>Tables with overviews are named according to another but simple convention: <em>o_&lt;LEVEL&gt;_&lt;BASE TABLE&gt;</em> where <strong>LEVEL</strong> is the integral overview level (factor) and <strong>BASE TABLE</strong> is name of table in which base raster is stored (<em>japan_rb_128</em> in this example).</p>
<p><a href="http://www.flickr.com/photos/mloskot/3592183460/" title="japan-wktraster-overviews by mloskot, on Flickr"><img src="http://farm4.static.flickr.com/3627/3592183460_73cc3dc011.jpg" width="332" height="435" alt="japan-wktraster-overviews" /></a></p>
<p>Now, the WKT Raster dataset consisting of base raster and 7 overviews is ready for testing.</p>
<p>List of software environment I used to perform the steps explained above:</p>
<ul>
<li>OS: GNU Linux / Ubuntu 9.04 installed as a guest on VirtualBox 2.2.4</li>
<li><a href="http://svn.osgeo.org/geos/">GEOS</a> + <a href="http://svn.osgeo.org/postgis/trunk/">PostGIS</a> + <a href="http://svn.osgeo.org/postgis/spike/wktraster/">WKT Raster</a>: all built and installed from sources available from trunk branches in their SVN repositories.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/06/03/crunching-overviews/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Size of enumeration type in C++</title>
		<link>http://mateusz.loskot.net/2009/05/24/size-of-enumeration-type-in-c/</link>
		<comments>http://mateusz.loskot.net/2009/05/24/size-of-enumeration-type-in-c/#comments</comments>
		<pubDate>Sun, 24 May 2009 16:37:34 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
		
		<category><![CDATA[c++]]></category>

		<category><![CDATA[osgeo]]></category>

		<category><![CDATA[programming]]></category>

		<category><![CDATA[visual c++]]></category>

		<category><![CDATA[enum]]></category>

		<category><![CDATA[enumeration]]></category>

		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=602</guid>
		<description><![CDATA[In C++ enumeration is used to define set of named constants. Each enumeration is a distinct compound type (enumerated type) and is subject to all rules of type system defined in C++ language. Internally, enumeration is represented with so called underlying type. The C++ Standard ISO/IEC 14882:2003 (Section 7.1/5) specifies it as follows:
The underlying type [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://en.wikipedia.org/wiki/C%2B%2B">C++</a> <a href="http://www.research.att.com/~bs/glossary.html#Genumeration">enumeration</a> is used to define set of named constants. Each enumeration is a <em>distinct compound type</em> (<a href="http://en.wikipedia.org/wiki/Enumerated_type">enumerated type</a>) and is subject to all rules of type system defined in C++ language. Internally, enumeration is represented with so called <em>underlying type</em>. The <a href="http://www.research.att.com/~bs/C++.html#standard">C++ Standard</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/">ISO/IEC 14882:2003</a> (Section 7.1/5) specifies it as follows:</p>
<blockquote><p>The underlying type of an enumeration is an integral type that can represent all the enumerator values defined in the enumeration.</p></blockquote>
<p>It is not specified which particular integral type is used to represent an enumerated type. Given that number of bytes representing fundamental integral types is <a href="http://www.research.att.com/~bs/glossary.html#Gimplementation-defined">implementation defined</a> in C++ and only <code>sizeof(char)</code>, <code>sizeof(signed char)</code> and <code>sizeof(unsigned char)</code> are guaranteed to be always <strong>1</strong>, value reported by <a href="http://en.wikipedia.org/wiki/Sizeof">sizeof</a> operator applied on enumeration is considered as <a href="http://www.research.att.com/~bs/bs_faq2.html#undefined">implementation defined</a> as well. Sometimes one may need to control size of enumerated type in memory, for instance to serialise and de-serialise objects easier.</p>
<p>Some compilers allow to specify underlying type of enumeration. For instance, <a href="http://msdn.microsoft.com/en-gb/visualc/default.aspx">Microsoft Visual C++</a> provides dedicated <a href="http://mateusz.loskot.net/?p=602&#038;preview=true">language extension</a>:</p>
<pre><code>enum Color : unsigned char
{
   red, green, blue
};
// assert(sizeof(Color) == 1);
</code></pre>
<p>Obviously, this technique is not portable across other implementations of  C++ language.</p>
</p>
<p>In order to solve this problem in portable way, a simple <a href="http://en.wikipedia.org/wiki/Template_(programming)">class template</a> can be defined:</p>
<pre><code>template &lt;class E, class T&gt;
struct enumeration
{
    typedef T type;
    typedef E enum_type;

    enumeration()
        : e_(E())
    {}

    enumeration(E e)
        : e_(static_cast&lt;T&gt;(e))
    {}

    operator E() const
    { return static_cast&lt;E&gt;(e_); }

private:
    T e_;
};</code></pre>
<p>The <code>enumeration</code> class can be used as a portable way to wrap any enumerated type and to specify (or limit) amount of bytes used to represent it. It is also interchangeable with actual enumeration being wrapped:</p>
<pre><code>#include &lt;cassert&gt;

enum Color { red, green, blue };

int main()
{
    enumeration&lt;Color, unsigned char&gt; color(blue);
    assert(sizeof(color) == 1);

    Color c = color;
    assert(c == blue);
}</code></pre>
<p>It&#8217;s also possible to provide default argument for template parameter <code>T</code> specifying underlying type of wrapped enumeration. For instance, if most constant values in a project range from 0 to 255, default type value of T can be <code>unsigned char</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2009/05/24/size-of-enumeration-type-in-c/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
