<?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>Mateusz Loskot &#187; osgeo</title>
	<atom:link href="http://mateusz.loskot.net/category/osgeo/feed/" rel="self" type="application/rss+xml" />
	<link>http://mateusz.loskot.net</link>
	<description>Into the Source of Software for Geospatial</description>
	<lastBuildDate>Tue, 03 Aug 2010 16:33:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8220;I have a confession to make&#8230;&#8221;</title>
		<link>http://mateusz.loskot.net/2010/07/07/i-have-a-confession-to-make/</link>
		<comments>http://mateusz.loskot.net/2010/07/07/i-have-a-confession-to-make/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 10:36:14 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javatar]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=2073</guid>
		<description><![CDATA[- Hey, what are guys up to?
- We are just enjoying some porn
- Hope you&#8217;re not doing Java and open source
- No!
The hilarious trailer of JAVATAR makes a brilliant psychological observation of human beings approaching different or new technologies. The technological emotions syndrome as pictured here is funny and scary at the same time. Had [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>- Hey, what are guys up to?<br />
- We are just enjoying some porn<br />
- Hope you&#8217;re not doing Java and open source<br />
- No!</p></blockquote>
<p>The hilarious trailer of JAVATAR makes a brilliant psychological observation of human beings approaching different or new technologies. The <em>technological emotions syndrome</em> as pictured here is funny and scary at the same time. Had there been no emotions expressed about IT, we wouldn&#8217;t observe all the holy battles <em>trolled out</em> loudly out there.</p>
<blockquote><p>- Dad&#8230;I have a confession to make<br />
- I use&#8230;</p></blockquote>
<p><object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/fzza-ZbEY70&amp;hl=en_GB&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/fzza-ZbEY70&amp;hl=en_GB&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></p>
<p>Alternative <a href="http://www.youtube.com/watch?v=ZUAKm6pT_pg">link</a> to the trailer.</p>
<p>Linux vs Windows. FOSS vs Proprietary. C++ vs Java. OSGeo vs ESRI. Python vs PHP. &lt;your favourite technology&gt; vs &lt;your hated technology&gt;</p>
<p>The funny part is the situation comedy being pictured. The worrying thing is, had the comedy not been pictured, we wouldn&#8217;t see it&#8217;s a comedy. A kind of drama, actually.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/07/07/i-have-a-confession-to-make/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Boost Geometry on FOSS4G 2010?</title>
		<link>http://mateusz.loskot.net/2010/04/15/boost-geometry-on-foss4g-2010/</link>
		<comments>http://mateusz.loskot.net/2010/04/15/boost-geometry-on-foss4g-2010/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 20:42:47 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[boost]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[ggl]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[osgeo]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=2064</guid>
		<description><![CDATA[
I&#8217;ve just submitted abstract of Boost Geometry presentation for FOSS4G 2010. I&#8217;m looking forward to spreading the word and give Introduction to Boost Geometry Library at the FOSS4G conference. Fingers crossed!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://2010.foss4g.org"><img src="/images/foss4g2010-logo.png" alt="FOSS4G 2010 - The leading Conference on Geospatial Free and Open Source Software" width="400" height="61" border="0" style="margin: 5px" /></a></p>
<p>I&#8217;ve just submitted abstract of <a href="http://trac.osgeo.org/ggl/">Boost Geometry</a> presentation for <a href="http://2010.foss4g.org">FOSS4G 2010</a>. I&#8217;m looking forward to spreading the word and give <strong>Introduction to Boost Geometry Library</strong> at the FOSS4G conference. Fingers crossed!</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/04/15/boost-geometry-on-foss4g-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Source, Decoupled and Accelerated</title>
		<link>http://mateusz.loskot.net/2010/03/17/open-source-decoupled-and-accelerated/</link>
		<comments>http://mateusz.loskot.net/2010/03/17/open-source-decoupled-and-accelerated/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 23:37:04 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[boost]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[David Abrahams]]></category>
		<category><![CDATA[foss]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=2022</guid>
		<description><![CDATA[All right, I confess, I&#8217;ve lied a bit in the topic. I&#8217;m not going to discuss any of the Free and Open Source Software philosophies here. What I&#8217;m going to do is to smuggle an interesting discussion that I believe it may be interesting to other Open Source Software hackers, especially projects from the C/C++ [...]]]></description>
			<content:encoded><![CDATA[<p>All right, I confess, I&#8217;ve lied a bit in the topic. I&#8217;m not going to discuss any of the <a href="http://en.wikipedia.org/wiki/Free_and_open_source_software">Free and Open Source Software</a> philosophies here. What I&#8217;m going to do is to smuggle an interesting discussion that I believe it may be interesting to other Open Source Software <a href="http://catb.org/hacker-emblem/">hackers</a>, especially projects from the C/C++ camp of the <a href="http://www.osgeo.org">OSGeo Foundation</a>. I would also say that subject of this discussion is quite idiomatic to the universe of <a href="http://producingoss.com/">FOSS production</a>. It is about a software project. A project that has grown and it has grown in many dimensions, also in parallel dimensions.</p>
<blockquote><p>&#8220;See the turtle of enormous girth!<br />
On his shell he holds the earth.&#8221; &#8212; <a href="http://www.stephenking.com/DarkTower/">Stephen King</a></p></blockquote>
<p>Infrastructure supporting a project becomes insufficient, maintenance is difficult, <em>release process is a full-time job</em> and <em>situation has taken a lot of the fun out of participating</em>. Population of users and developers has grown. As the <a href="http://lists.osgeo.org">Community</a> gathers appreciable portfolio of <a href="http://www.boost.org/users/people.html">masters of the software development craft</a>, it is in constant state of snowball war exchanging fire of ideas, new projects and discussions. It&#8217;s truly a pleasure to learn about them but, well, it pours oil on the fire of entropy. Here we come to the crux.</p>
<blockquote><p>Gain of entropy eventually is nothing more nor less than loss of information &#8212; <a href="http://en.wikipedia.org/wiki/Gilbert_Newton_Lewis">Gilbert N. Lewis</a></p></blockquote>
<p>Today, <a href="http://en.wikipedia.org/wiki/David_Abrahams_%28computer_programmer%29">David Abrahams</a> posted, somewhat provocative, e-mail to the <a href="http://www.boost.org">Boost</a> project mailing list. It is titled <a href="http://article.gmane.org/gmane.comp.lib.boost.devel/200952">Boost, Decoupled and Accelerated</a> and delivers the following message: <em>It&#8217;s time to make Boost development fun again</em>.</p>
<p>It may sound like yet another internal discussion within an Open Source project. There are zillions of similar debates archived around. Yes, indeed, but not exactly. In fact, David announced something that may be of wider interested. It is</p>
<blockquote><p>a system called <a href="http://www.ryppl.org/">Ryppl</a> to decentralize development, testing, release, and installation of interdependent projects</p></blockquote>
<p>followed by yet more interesting comment</p>
<blockquote><p>I believe this project has the potential to change the face not only of Boost, but of open-source software in general.</p></blockquote>
<p>One may think, well, it seems related to the issue of <a href="http://www.scottberkun.com/blog/category/myths-of-innovation/">the current trends</a> or we&#8217;re suffering redundancy in <a href="http://twitter.com/timoreilly/statuses/10186975174">IT prophets</a>. <a href="http://www.lyricsdepot.com/DORIS-DAY/perhaps-perhaps-perhaps.html">Perhaps, perhaps, perhaps&#8230;</a> but what I know for sure is that David Abrahams is one of my favourite and highly regarded software developer and author. I can hardly recall any of David&#8217;s comments, observations or suggestions that would be lacking of point, I mean a very rational point.</p>
<p>I have licked a bit of experience myself of working with or maintaining complex projects or projects that feel complex. I think I wouldn&#8217;t risk anything saying David has a point. I&#8217;m looking forward learning more about the whole idea.</p>
<p>I hope I&#8217;ll be able to confirm it myself while listening to David&#8217;s presentation at <a href="http://www.boostcon.com/">BoostCon&#8217;10</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/03/17/open-source-decoupled-and-accelerated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boost.Geometry blog</title>
		<link>http://mateusz.loskot.net/2010/03/14/boost-geometry-blog/</link>
		<comments>http://mateusz.loskot.net/2010/03/14/boost-geometry-blog/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 22:12:15 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[boost]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[ggl]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Barend Gehrels]]></category>
		<category><![CDATA[boost.geometry]]></category>
		<category><![CDATA[geometry]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=2014</guid>
		<description><![CDATA[It&#8217;s been a month since Barend Gehrels launched blog dedicated to development of Boost.Geometry library which is also known of its former name as Generic Geometry Library or shortly GGL.
Here I go we a bit delayed announcement: http://barendgehrels.blogspot.com
]]></description>
			<content:encoded><![CDATA[<p><a href="http://trac.osgeo.org/ggl/"><img src="/images/logos/ggl-logo.png" alt="Boost Geometry (aka Generic Geometry Library, GGL)"  width="200" height="80" align="left" border="0" style="margin: 5px" /></a>It&#8217;s been a month since <a href="http://www.boostcon.com/program/speakers">Barend Gehrels</a> launched blog dedicated to development of <a href="http://trac.osgeo.org/ggl/">Boost.Geometry</a> library which is also known of its former name as <a href="http://industry.slashgeo.org/industry/09/02/17/1715248.shtml">Generic Geometry Library</a> or shortly GGL.</p>
<p>Here I go we a bit delayed announcement: <a href="http://barendgehrels.blogspot.com">http://barendgehrels.blogspot.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/03/14/boost-geometry-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boost.Geometry and macros made by Apple</title>
		<link>http://mateusz.loskot.net/2010/03/10/cc-macros-made-by-apple/</link>
		<comments>http://mateusz.loskot.net/2010/03/10/cc-macros-made-by-apple/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 00:48:39 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[boost]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[boost.geometry]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[macros]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=1984</guid>
		<description><![CDATA[I have no pleasure continuing my macros are evil tales but the life of C++ programmer eagerly wants to writes add another chapter to the story. Today, it&#8217;s time to rant on Apple and its XCode.
One of Boost Geometry (aka GGL) users, Mark, reported that he can not compile his program using the library with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://trac.osgeo.org/ggl/"><img src="/images/logos/ggl-logo.png" alt="Boost Geometry (aka Generic Geometry Library, GGL)"  width="200" height="80" align="left" border="0" style="margin: 5px" /></a>I have no pleasure continuing my <a href="/&#038;p=1755">macros are evil tales</a> but the life of C++ programmer eagerly wants to writes add another chapter to the story. Today, it&#8217;s time to rant on <a href="http://www.apple.com">Apple</a> and its <a href="http://en.wikipedia.org/wiki/XCode">XCode</a>.</p>
<p>One of <a href="http://trac.osgeo.org/ggl/">Boost Geometry</a> (aka GGL) users, Mark, <a href="http://lists.osgeo.org/pipermail/ggl/2010-March/000649.html">reported</a> that he can not compile his program using the library with GNU C++ compiler from XCode. The compiler throws mysterious complain of a very low-level nature of C++ programming language:</p>
<pre>Expected unqualified-id before 'do' in
/usr/local/include/boost_1_42_0/boost/geometry/geometries/concepts/check.hpp</pre>
<p>Thanks to <a href="http://lists.osgeo.org/pipermail/ggl/2010-March/000653.html">follow-up by Stjepan</a> we quickly know who to blame for that. It is XCode header <code>AssertMacros.h</code>. It even might be <a href="http://www.opensource.apple.com/source/xnu/">one of public headers</a> from development package of <a href="http://en.wikipedia.org/wiki/XNU">XNU</a>, the Mac OS X kernel, what&#8217;s even more fun.</p>
<h3>What actually happens that causes the problem?</h3>
<p>Boost Geometry defines function template for concept checking:</p>
<pre><code>template &lt;typename Geometry&gt;
inline void check()
{
    detail::checker&lt;Geometry, boost::is_const&lt;Geometry&gt;::type::value&gt; c;
    boost::ignore_unused_variable_warning(c);
}</code></pre>
<p>Apple XCode defines macro using exactly the same name as the function <code>check</code>. The C++ preprocessor, which operates before compiler, substitutes the name <code>check</code> with content of the macro. For the Boost Geometry function <code>check</code> it means that a pile of garbage is injected in place were the function name is expected:</p>
<pre><code>template &lt;typename Geometry&gt;
inline void do { if ( __builtin_expect(!(), 0) ) { DebugAssert('?*?*',
0, "Third Party Client" ": " "", 0, 0, "/usr/local/include/boost/
geometry/geometries/concepts/check.hpp", 181, (void*)0); } } while ( 0 )
{
     detail::checker<geometry , boost::is_const<Geometry>::type::value> c;
     boost::ignore_unused_variable_warning(c);
}</geometry></code></pre>
<p>Obviously, it makes compiler to give up to instantiate the <code>check</code> function from the template and to compile it properly.</p>
<p>C/C++ macros are evil, however, not by design but by insanity of programmers. Every macro defined in a public C/C++ header, should be defined using <em>as unique as possible, but still usable</em> name. I wish Apple folks designed their C/C++ macros as unique as they make their hardware products, even if <a href="http://en.wikipedia.org/wiki/Made_in_China#Marketing_significance">made in China</a> eventually. This particular macro that caused the problems discussed here, could be named to <code>APPLE_XNU_CHECK</code> and life would be easier. Or, given the fact that <a href="https://svn.boost.org/trac/boost/ticket/2115#comment:7">almost 3000 files using these identifiers</a> live in <a href="http://www.boost.org">Boost C++ Libraries</a> only, I probably should say: life would be more productive, efficient and cheaper.</p>
<p>By the way, it&#8217;s a known problem @ Boost and it looks Boost Folks are trying to figure out best solution. See ticket <a href="https://svn.boost.org/trac/boost/ticket/2115">#2115 &#8211; Avoid bad Apple macros</a>.</p>
<p>&#8230;to be continued</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/03/10/cc-macros-made-by-apple/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AX_LIB_LIBKML macro</title>
		<link>http://mateusz.loskot.net/2010/03/04/ax_lib_libkml-macro/</link>
		<comments>http://mateusz.loskot.net/2010/03/04/ax_lib_libkml-macro/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 00:10:11 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[gdal]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[libkml]]></category>
		<category><![CDATA[macro]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=1942</guid>
		<description><![CDATA[Recently, I was playing for a while with Brian&#8217;s new OGR LIBKML driver and I integrated it with GDAL/OGR build system, so it&#8217;s more convenient to build, test and use it. The complete tree is available in GDAL sandbox in mloskot/winkey-libkml. (It is just a give it a try-like prototype and I don&#8217;t actively maintain [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I was playing for a while with <a href="http://lists.osgeo.org/pipermail/gdal-dev/2010-February/023718.html">Brian</a>&#8217;s new <a href="http://winkey.org/svn/libkml/">OGR LIBKML driver</a> and I integrated it with <a href="http://www.gdal.org/ogr/">GDAL/OGR</a> build system, so it&#8217;s more convenient to build, test and use it. The complete tree is available in GDAL sandbox in <a href="https://svn.osgeo.org/gdal/sandbox/mloskot/winkey-libkml/">mloskot/winkey-libkml</a>. (It is just a <em>give it a try</em>-like prototype and I don&#8217;t actively maintain this branch myself. Hopefully, Brian will take it over.)</p>
<p>By the way, I crafted <a href="http://github.com/mloskot/workshop/blob/master/autotools/macros/ax_lib_libkml.m4">AX_LIB_LIBKML</a> macro for <a href="http://www.gnu.org/software/autoconf/">Autoconf</a>. This macros checks for headers and libraries of specified version (or newer) of Google <a href="http://code.google.com/p/libkml/">libkml</a> library and defines compilation and linking flags.</p>
<p>I <a href="http://savannah.gnu.org/patch/index.php?7109">submitted the macro</a> to <a href="http://www.gnu.org/software/autoconf-archive/">GNU Autoconf Archive</a>. It is the new incarnation of well-known <a href="http://autoconf-archive.cryp.to">autoconf-archive.cryp.to</a>. Peter Simons <a href="http://lists.gnu.org/archive/html/autoconf-archive-maintainers/2009-12/msg00000.html">announced</a> not long time ago that</p>
<blockquote><p>The archive has moved to Savannah: <a href="http://www.nongnu.org/autoconf-archive/">http://www.nongnu.org/autoconf-archive/</a>. Version 2009-04-26 was the last to be released at autoconf-archive.cryp.to.</p></blockquote>
<p>Happy detecting libkml!</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/03/04/ax_lib_libkml-macro/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Const-correctness schizophrenia in GDAL</title>
		<link>http://mateusz.loskot.net/2010/03/04/const-correctness-schizophrenia-in-gdal/</link>
		<comments>http://mateusz.loskot.net/2010/03/04/const-correctness-schizophrenia-in-gdal/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 23:23:59 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[gdal]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=1951</guid>
		<description><![CDATA[Const-correctness rants are quite common topic of chats on #gdal IRC channel. Some of the pearls I&#8217;ve got printed in to my mind:
A: The lesson is I ought to get things right the first time.
B: The issue with const method is that if you want to add lazy loading later, it can cause problems
C: GDAL [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Const-correctness">Const-correctness</a> rants are quite common topic of chats on <a href="irc://irc.freenode.net/#gdal">#gdal</a> IRC channel. Some of the pearls I&#8217;ve got printed in to my mind:</p>
<blockquote><p><strong>A</strong>: The lesson is I ought to get things right the first time.<br />
<strong>B</strong>: The issue with <code>const</code> method is that if you want to add lazy loading later, it can cause problems<br />
<strong>C</strong>: GDAL is rather painful to use with <code>const</code> correct code, unfortunately :(<br />
<strong>B</strong>: The solution is obvious: don&#8217;t write <code>const</code> correct code</p></blockquote>
<p>Who&#8217;s right then, A or B?</p>
<p>I recall another motto from #gdal channel that sounds like <em>&#8220;when unsure, do nothing&#8221;</em> which has the following rationale:</p>
<blockquote><p>especially when I realize afterwards that I&#8217;ve f**cked things because I neglected to follow the motto</p></blockquote>
<p>Remembering these recommendations, it&#8217;s pretty clear why <em>the const-mess</em> in <a href="http://www.gdal.org">GDAL</a> has happened. I&#8217;d conclude paraphrasing the motto this way:</p>
<blockquote><p>I&#8217;ve f**cked things because I neglected to make a decision.</p></blockquote>
<p>Now, poor <a href="http://lists.osgeo.org/pipermail/gdal-dev/2010-March/023776.html">GDAL beginner deadpickle</a>, trying to find out (<a href="http://lists.osgeo.org/pipermail/gdal-dev/2010-March/023781.html">it&#8217;s me the evil</a>) why compiler complains about his not-that-bad-written code, <a href="http://groups.google.co.uk/group/comp.lang.c/browse_thread/thread/41e53e9bb82de6ec">wandered to find and ask C gurus</a> @ <a href="http://groups.google.com/group/comp.lang.c">comp.lang.c</a> and got the problem explained by Malcolm who wrote:</p>
<blockquote><p>The problem is that, when C was first developed, there was no const keyword. So strings literal, which are constant, had to be non-const for backwards compatibility. This means that lots of programmers get lazy and omit the const, even from functions which don&#8217;t modify their string arguments. (There are also some subtle problems with const which means that this isn&#8217;t always a case of pure laziness). So a sort of solution is to discard the const qualifiers. However this is perpetuating the problem in your own code. </p></blockquote>
<p>The motto stays in contradiction to a well-known best practice of <a href="http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.3">const correct sooner than later</a>. It&#8217;s way easier and cheaper to remove const-correctness once it turns out it does not express properly the actual design and contract than to apply it to existing codebase. Sometimes, the latter is even not possible making things <em>f**cked up twice, in existing code base and in client&#8217;s code</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/03/04/const-correctness-schizophrenia-in-gdal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CMake interview for FLOSS Weekly at 4:30 EST</title>
		<link>http://mateusz.loskot.net/2010/03/03/cmake-interview-for-floss-weekly-at-430-est/</link>
		<comments>http://mateusz.loskot.net/2010/03/03/cmake-interview-for-floss-weekly-at-430-est/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 21:36:47 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[cmake]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Bill Hoffman]]></category>
		<category><![CDATA[floss]]></category>
		<category><![CDATA[tv]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=1936</guid>
		<description><![CDATA[Bill Hoffman just notified on the CMake mailing list:
At 4:30, I am going to be interviewed for FLOSS Weekly.
The chat is here:
http://irc.twit.tv/
The video is here:
http://live.twit.tv/
Should be going on some time around 4:30 EST.
It&#8217;s on now.

UPDATE: FLOSS Weekly 111: CMake archived audio podcast
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cmake.org/pipermail/cmake/2010-March/035591.html">Bill Hoffman just notified</a> on the CMake mailing list:</p>
<blockquote><p>At 4:30, I am going to be interviewed for FLOSS Weekly.<br />
The chat is here:<br />
<a href="http://irc.twit.tv/">http://irc.twit.tv/</a><br />
The video is here:<br />
<a href="http://live.twit.tv/">http://live.twit.tv/</a><br />
Should be going on some time around <a href="http://www.timeanddate.com/library/abbreviations/timezones/na/est.html">4:30 EST</a>.</p></blockquote>
<p>It&#8217;s on now.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="320" id="utv30564"><param name="flashvars" value="autoplay=false&amp;brand=embed&amp;cid=1524"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="movie" value="http://www.ustream.tv/flash/live/1/1524"/><embed flashvars="autoplay=false&amp;brand=embed&amp;cid=1524" width="400" height="320" allowfullscreen="true" allowscriptaccess="always" id="utv30564" name="utv_n_936132" src="http://www.ustream.tv/flash/live/1/1524" type="application/x-shockwave-flash" /></object></p>
<p>UPDATE: <a href="http://twit.tv/floss111">FLOSS Weekly 111: CMake</a> archived audio podcast</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/03/03/cmake-interview-for-floss-weekly-at-430-est/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GIS-Lab joins Planet OSGeo</title>
		<link>http://mateusz.loskot.net/2010/02/27/gis-lab-joins-planet-osgeo/</link>
		<comments>http://mateusz.loskot.net/2010/02/27/gis-lab-joins-planet-osgeo/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 23:21:19 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[gis]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[gis-lab]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=1930</guid>
		<description><![CDATA[Maxim Dubinin syndicated GIS-Lab blog with the Planet OSGeo aggregator.
A few words about GIS-Lab from their website:
GIS-Lab &#8211; informal non-commercial community of GIS/RS specialists, we grow ourselves and help grow others.
GIS-Lab exists since April 2002 as an independent online resource specializing in geographic information systems (GIS) and remote sensing (RS). At present, the site is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/logos/osgeo-logo.png" width="123" height="52" alt="OSGeo Foundation" align="left" border="0" style="margin: 5px" /><a href="http://silvis.forest.wisc.edu/people/dubinin.asp">Maxim Dubinin</a> syndicated <a href="http://gis-lab.info/">GIS-Lab</a> blog with the <a href="http://planet.osgeo.org">Planet OSGeo</a> aggregator.</p>
<p>A few words <a href="http://gis-lab.info/about-eng.html">about GIS-Lab</a> from their website:</p>
<blockquote><p>GIS-Lab &#8211; informal non-commercial community of GIS/RS specialists, we grow ourselves and help grow others.</p>
<p>GIS-Lab exists since April 2002 as an independent online resource specializing in geographic information systems (GIS) and remote sensing (RS). At present, the site is primarily oriented towards Russian-speaking GIS community, however, we do our best to translate as many materials as possible into English.</p></blockquote>
<p>The GIS-Lab is the very first blog in Russian language syndicated with the Planet OSGeo, what makes the planet yet more international geo-caffee.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/02/27/gis-lab-joins-planet-osgeo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SqlGeometry and POINT EMPTY in WKB</title>
		<link>http://mateusz.loskot.net/2010/02/26/sqlgeometry-and-point-empty-in-wkb/</link>
		<comments>http://mateusz.loskot.net/2010/02/26/sqlgeometry-and-point-empty-in-wkb/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 22:53:29 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[visual c#]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=1914</guid>
		<description><![CDATA[Inspired by question Paul Ramsey asked today morning on IRC, I&#8217;ve inspected what kind of Well-Known-Binary output gives SqlGeometry for EMPTY geometries of all the seven geometry types as specified in OGC SFS. The SqlGeometry class is available from SQL Server System CLR Types for .NET Framework. Here we go.
I checked Well-Known-Binary output as returned [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by question <a href="http://www.cleverelephant.ca/index.html">Paul Ramsey</a> asked today morning on IRC, I&#8217;ve inspected what kind of Well-Known-Binary output gives <a href="http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.types.sqlgeometry%28SQL.105%29.aspx">SqlGeometry</a> for <code>EMPTY</code> geometries of all the seven geometry types as specified in OGC SFS. The <code>SqlGeometry</code> class is available from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=228DE03F-3B5A-428A-923F-58A033D316E1">SQL Server System CLR Types</a> for .NET Framework. Here we go.</p>
<p>I checked Well-Known-Binary output as returned by the SqlGeometry method <a href="http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.types.sqlgeometry.stasbinary%28SQL.105%29.aspx">STAsBinary()</a>. Here is a small test program written in C#:</p>
<pre><code>using System;
using System.Linq;
using Microsoft.SqlServer.Types;
namespace SqlGeometryEmpty
{
  class Test
  {
    static void Main(string[] args)
    {
      foreach (string type in
         Enum.GetNames(typeof(OpenGisGeometryType)))
      {
        string wkt = type.ToUpper() + " EMPTY";
        SqlGeometry geom = SqlGeometry.Parse(wkt);
        byte[] wkb = geom.STAsBinary().Buffer;
        string wkbhex = string.Join("",
          wkb.Select(
            b => b.ToString("X2")).ToArray());

        Console.WriteLine("{0}\n{1} ({2} bytes)\n",
          wkt, wkbhex, wkb.Length);
      }
    }
  }
}</code></pre>
<p>The first observation is that WKB of <code>EMPTY</code> geometry for all types is returned as a a slightly different binary. All the binary forms are truncated to <strong>nine bytes</strong>. The <strong>first byte</strong> indicates endianness as expected. The <strong>second</strong> chunk of <strong>four bytes</strong> indicate geometry type. It is exactly as defined in OGC specifications. The <strong>third</strong> chunk of remaining <strong>four bytes</strong> are set to Zero and seem to play a role of size specifier: number of points in <code>LINESTRING</code> or number of rings in <code>POLYGON</code>, number of points in <code>MULTIPOINT</code>, and so on. This makes another observation that WKB for EMPTY is reported as a collection of primitive components.</p>
<p>The difference in binary of WKB of EMPTY geometry I mentioned is in that the actual type of input geometry is preserved, so there seems to be no implicit translation to geometry of some other type.</p>
<p>So far so good but not for too long. In fact, <code>SqlGeometry</code> implicitly <em>casts</em> <code>POINT EMPTY</code> to <code>MULTIPOINT EMPTY</code> geometry with the WKB of the following form (in hex):</p>
<pre>010400000000000000</pre>
<p>Here is complete output of the test program above:</p>
<pre>POINT EMPTY
010400000000000000 (9 bytes)

LINESTRING EMPTY
010200000000000000 (9 bytes)

POLYGON EMPTY
010300000000000000 (9 bytes)

MULTIPOINT EMPTY
010400000000000000 (9 bytes)

MULTILINESTRING EMPTY
010500000000000000 (9 bytes)

MULTIPOLYGON EMPTY
010600000000000000 (9 bytes)

GEOMETRYCOLLECTION EMPTY
010700000000000000 (9 bytes)</pre>
<p>A word about how <a href="http://www.postgis.org/">PostGIS</a> behaves. PostGIS reports <code>GEOMETRYCOLLECTION EMPTY</code>, regardless of actual type of input <code>EMPTY</code> geometry. It is in hex form:</p>
<pre>010700000000000000</pre>
<p>Generally, there is not many choices of how to report EMPTY geometry in clear and usable way and a form of collection with size equal to Zero seems to be the most appropriate choice. <code>POINT EMPTY</code> reported with type set to <code>POINT</code> (010100000000000000) would be ambiguous as <em>feels</em> like truncated or invalid form of <code>POINT(0 0)</code>, especially in programming languages like C where native dynamic allocated arrays do not carry information about their size. IOW, geometry type is not enough information to process binary form of <code>POINT EMPTY</code> properly.</p>
<p>Reporting <code>EMPTY</code> geometries as a collection is a useful convention that seems to work well. PostGIS behaves about it in the very consistent manner reporting one type for all <em>empties</em>. SqlGeometry, so SQL Server, forces programmers to write a few more lines of code to handle all the possible cases. Yet another <del datetime="2010-02-26T22:41:25+00:00">original</del> exotic solution from Microsoft.</p>
<p>Consistent API is a bless!</p>
<p>Update: consistent specification of interface is even better.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2010/02/26/sqlgeometry-and-point-empty-in-wkb/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
