<?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; fdo</title>
	<atom:link href="http://mateusz.loskot.net/tag/fdo/feed/" rel="self" type="application/rss+xml" />
	<link>http://mateusz.loskot.net</link>
	<description>mloskot&#039;s life, programming, c++, geo and adventures</description>
	<lastBuildDate>Tue, 10 Jan 2012 22:03:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WKB hex decoder in C++</title>
		<link>http://mateusz.loskot.net/2008/08/21/wkb-hex-decoder-in-c/</link>
		<comments>http://mateusz.loskot.net/2008/08/21/wkb-hex-decoder-in-c/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 15:53:56 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[bytes]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[decode]]></category>
		<category><![CDATA[fdo]]></category>
		<category><![CDATA[fgf]]></category>
		<category><![CDATA[hex]]></category>
		<category><![CDATA[ogc]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[stream]]></category>
		<category><![CDATA[wkb]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/?p=270</guid>
		<description><![CDATA[In PostGIS world, I often need to construct geometry from Well-Known-Binary (WKB) or PostGIS EWKB stream encoded as hex stream. It&#8217;s easy to do if I have access to PostgreSQL/PostGIS client which accepts SQL queries: SELECT ST_AsText( ST_GeomFromWKB( decode('0101000000e5d022dbf93e2e40dbf97e6abc743540', 'hex'), &#8230; <a href="http://mateusz.loskot.net/2008/08/21/wkb-hex-decoder-in-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.postgis.org/">PostGIS</a> world, I often need to construct geometry from Well-Known-Binary (WKB) or <a href="http://www.postgis.org/documentation/manual-1.3/ch04.html">PostGIS EWKB</a> stream encoded as hex stream. It&#8217;s easy to do if I have access to PostgreSQL/PostGIS client which accepts SQL queries:</p>
<pre><code>SELECT
   ST_AsText(
      ST_GeomFromWKB(
         decode('0101000000e5d022dbf93e2e40dbf97e6abc743540', 'hex'),
         4326))</code></pre>
</p>
<p>I often need to do the same directly in C++ code &#8211; parse hex encoded binary stream to raw stream of bytes. Here is simple hex decoder I use:</p>
<pre><code>#include &lt;sstream&gt;
#include &lt;string&gt;
#include &lt;vector&gt;
typedef std::vector&lt;unsigned char&gt; ewkb_t;

// bytes [out] - buffer for binary output
void hex_to_bytes(std::string const&#038; hexstr, ewkb_t&#038; bytes)
{
    bytes.clear();
    for(std::string::size_type i = 0; i < hexstr.size() / 2; ++i)
    {
        std::istringstream iss(hexstr.substr(i * 2, 2));
        unsigned int n;
        iss >> std::hex >> n;
        bytes.push_back(static_cast&lt;unsigned char&gt;(n));
    }
}
</code></pre>
</p>
<p>For example, I use it to build <a href="http://trac.osgeo.org/fdo/browser/trunk/Providers/PostGIS/Src/Provider/PgGeometry.h">FDO geometry objects</a> using another utility <a href="http://trac.osgeo.org/fdo/browser/trunk/Providers/PostGIS/Src/Provider/PgGeometry.cpp?rev=3904#L284">CreateGeometryFromExtendedWkb</a> defined in FDO provider for PostGIS:</p>
<pre><code>// POINT (1.234 5.678)
std::string ewkbhex("01010000005839B4C876BEF33F83C0CAA145B61640");
ewkb_t ewkb;
hex_to_bytes(ewkbhex, ewkb);
if (!ewkb.empty())
{
   FdoPtr&lt;fdoigeometry> g = CreateGeometryFromExtendedWkb(ewkb);
   // ... use geometry
}</code></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2008/08/21/wkb-hex-decoder-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostGIS provider for FDO update</title>
		<link>http://mateusz.loskot.net/2008/05/09/postgis-provider-for-fdo-update/</link>
		<comments>http://mateusz.loskot.net/2008/05/09/postgis-provider-for-fdo-update/#comments</comments>
		<pubDate>Fri, 09 May 2008 11:29:25 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[fdo]]></category>
		<category><![CDATA[feature data objects]]></category>
		<category><![CDATA[ogr]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/2008/05/09/postgis-provider-for-fdo-update/</guid>
		<description><![CDATA[During last weeks, a lot of fresh bits have been contributed to the PostGIS provider for FDO Open Source. The great part of this work was committed by Bruno Scott and his colleagues. Bruno has recently joined the FDO development &#8230; <a href="http://mateusz.loskot.net/2008/05/09/postgis-provider-for-fdo-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>During last weeks, a lot of fresh bits have been contributed to the <a href="http://postgis.refractions.net/">PostGIS</a> provider for <a href="http://fdo.osgeo.org/">FDO</a> Open Source. The great part of this work was committed by Bruno Scott and his colleagues. Bruno has recently <a href="http://lists.osgeo.org/pipermail/fdo-internals/2008-April/002069.html">joined the FDO development team</a>. I&#8217;d like to express <em>my deep gratitude</em> to Bruno for his <em>fantastic help</em> in improving the PostGIS provider. The provider has got better shape and stability.</p>
<p>Recently, I&#8217;ve failed my duties in the provider development, so motivated by the load of Bruno&#8217;s work I found some gaps in time to submit a few fixes too :-)</p>
<p><span id="more-243"></span></p>
<p>For all interested in development of the PostGIS provider for FDO, here is detailed list of the recent updates (links point to tickets in <a href="http://trac.osgeo.org/fdo/">FDO Trac</a> database):</p>
<ul>
<li><a href="http://trac.osgeo.org/fdo/ticket/94">#94</a> Generate extent for features assigned to default spatial context</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/106">#106</a> PostGIS provider cannot delete a feature class</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/171">#171</a> Fdo Postgis Autogenated identity property is mandatory</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/178">#178</a> PostGIS : Can&#8217;t insert in a non-feature class</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/232">#232</a> Fdo Postgis null and not null filter does not work</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/233">#233</a> Fdo Postgis in and not in filter does not work</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/234">#234</a> Fdo Postgis currently does not support anything but lowercase identifiers</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/235">#235</a> Fdo Postgis Exception with insert</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/236">#236</a> Fdo Postgis does not support non spatial classes</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/241">#241</a> Implement Support for SelectAggregates, SpatialExtents and Count</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/310">#310</a> PostGIS provider : change class naming convention without ~</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/311">#311</a> PostGIS provider : mismatch between FdoGeometricTypes and FdoGeometryType</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/312">#312</a> PostGIS provider : remove boost_date_time dll dependency</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/313">#313</a> PostGIS provider : can&#8217;t filter,insert or update date/datetime</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/314">#314</a> PostGIS provider : check-out/check-in crashes Autodesk Map</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/324">#324</a> PostGIS provider : Insert and update geometry failed when a table has a srid</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/328">#328</a> PostGIS FdoIInsert::Execute always returns NULL</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/329">#329</a> PostGIS FdoISQLCommand::GetSQLStatement always returns NULL</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/337">#337</a> PostGIS defect : insert,update more than one column failed on dates</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/338">#338</a> PostGIS defect : insert with srid -1 failed</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/339">#339</a> PostGIS defect : Srid is not set properly when creating a FeatureClass</li>
<li><a href="http://trac.osgeo.org/fdo/ticket/341">#341</a> PostGIS defect : SelectAggregate does not support DISTINCT</li>
</ul>
<p>All the fixes listed above will be included in next version <a href="http://trac.osgeo.org/fdo/milestone/3.4.0">3.4.0</a> of Feature Data Objects.</p>
<p>From another area of the FDO development, check <a href="http://www.jasonbirch.com">Jason&#8217;s</a> post about the brand new <a href="http://www.jasonbirch.com/nodes/2008/05/06/184/sqlite-for-fdo-with-sugar-free-ogr/trackback/">SQLite for both FDO</a> and <a href="http://www.gdal.org/ogr/">OGR</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2008/05/09/postgis-provider-for-fdo-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FDO goes for Python</title>
		<link>http://mateusz.loskot.net/2007/03/14/fdo-goes-for-python/</link>
		<comments>http://mateusz.loskot.net/2007/03/14/fdo-goes-for-python/#comments</comments>
		<pubDate>Wed, 14 Mar 2007 10:21:15 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[fdo]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/2007/03/14/fdo-goes-for-python/</guid>
		<description><![CDATA[A few hours ago, guys from the core development team of Feature Data Objects submitted new cool stuff to the FDO repository &#8211; Python scripting support for FDO API. The Python bindings are generated with SWIG. As Greg Boone reported &#8230; <a href="http://mateusz.loskot.net/2007/03/14/fdo-goes-for-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A few hours ago, guys from the core development team of <a href="http://fdo.osgeo.org/">Feature Data Objects</a> submitted new cool stuff to the <a href="http://trac.osgeo.org/fdo/browser">FDO repository</a> &#8211;  Python scripting support for FDO API.</p>
<p>The Python bindings are generated with SWIG. As Greg Boone <a href="http://lists.osgeo.org/pipermail/fdo-internals/2007-March/000910.html">reported</a> on the <a href="http://lists.osgeo.org/mailman/listinfo/fdo-internals" title="FDO mailing list for developers">fdo-internals</a>, currently Python bindings can be generated and used on Windows only. Linux support will be available soon. Also, it has been only tested with Python .2.4 so far and 2.5 line is not supported yet.</p>
<p>The Python scripting support for the <em>Feature Data Objects</em> is still under development but I&#8217;m sure it&#8217;s a great news for the large community of Python users in geospatial field. This is a next step to attract potential FDO users.</p>
</p>
<p>There is more about <em>pyFDO</em> subject on Jason Birch&#8217;s blog: <a href="http://www.jasonbirch.com/nodes/2007/03/14/67/pyfdo-is-in-the-house-yeah-baby/">pyFDO is in the House &#8211; Yeah Baby!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2007/03/14/fdo-goes-for-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FDO, any plans for summer?</title>
		<link>http://mateusz.loskot.net/2007/02/16/fdo-any-plans-for-summer/</link>
		<comments>http://mateusz.loskot.net/2007/02/16/fdo-any-plans-for-summer/#comments</comments>
		<pubDate>Fri, 16 Feb 2007 09:40:07 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[fdo]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/2007/02/16/fdo-any-plans-for-summer/</guid>
		<description><![CDATA[Thanks to Jason Birch recently calling on the FDO developers mailing list, it&#8217;s getting loudly about idea of joining the Google Summer of Code 2007 with Feature Data Objects project. I strongly support Jason&#8217;s idea because with SoC, Google is &#8230; <a href="http://mateusz.loskot.net/2007/02/16/fdo-any-plans-for-summer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Thanks to <a href="http://www.jasonbirch.com/nodes/">Jason Birch</a> recently <a href="http://lists.osgeo.org/pipermail/fdo-internals/2007-February/000798.html">calling</a> on the FDO developers <a href="http://lists.osgeo.org/pipermail/fdo-internals/">mailing list</a>, it&#8217;s getting loudly about idea of joining the <a href="http://google-code-updates.blogspot.com/2007/02/speaking-of-summer.html">Google Summer of Code 2007</a> with <a href="http://fdo.osgeo.org/">Feature Data Objects</a> project.</p>
<p>I strongly support Jason&#8217;s idea because with SoC, Google is giving a great opportunity for <a href="http://code.google.com/projects.html">Open Source</a> projects to <a href="http://www.refractions.net/soc2006/">boost</a> their development and gain new features or <a href="http://en.wikipedia.org/wiki/Software_Prototyping">prototypes </a>ready for next steps toward usability.</p>
<p><span id="more-181"></span></p>
<p>Jason posted a nice proposal of features for SoC. Here are my favorites:</p>
<ul>
<li>
<p><a href="http://en.wikipedia.org/wiki/64-bit">64-bit</a> platform support</p>
<p>FDO is not officially nor unofficially supported and as latest <a href="http://lists.osgeo.org/pipermail/fdo-internals/2007-February/000799.html">reports</a> indicate some substantial work is required.</p>
</li>
<li>
<p><a href="http://en.wikipedia.org/wiki/Command_line_interface">Command line</a> tools</p>
<p>I&#8217;m a big fun of GDAL and OGR command line utilities. I think it&#8217;s a great idea about having similar tools for FDO: fdoinfo, fdo2fdo, etc. Having <a href="http://gdal.osgeo.org/ogr/ogr2ogr.html">ogr2ogr</a> and fdo2fdo, a user would be able to pipe vector data in any direction :-). Another utility I&#8217;m thinking about is fdoinfo, FDO equivalent of <a href="http://gdal.osgeo.org/ogr/ogrinfo.html">ogrinfo</a> from the OGR package.</p>
</li>
<li>
<p><a href="http://www.apple.com/macosx/">Mac OS X</a> support</p>
<p>Yes, FDO is not supported on this platform. The SoC 2007 could be a nice opportunity to change this situation.</p>
</li>
</ul>
<p>If you have any idea of new features you&#8217;d like to see in the Feature Data Objects, please propose them on the <a href="http://lists.osgeo.org/mailman/listinfo/fdo-internals">fdo-internals</a> list or just put here as a comment and I&#8217;ll forward them to the FDO team.</p>
<p>I&#8217;m wondering if there is any motion in <a href="http://www.osgeo.org/">OSGeo</a> to become a <a href="http://code.google.com/support/bin/answer.py?answer=60290&#038;topic=10732">mentoring organization</a> for Google SoC and if such idea is reasonable in any way.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2007/02/16/fdo-any-plans-for-summer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About handling FDO exceptions</title>
		<link>http://mateusz.loskot.net/2007/02/08/about-handling-fdo-exceptions/</link>
		<comments>http://mateusz.loskot.net/2007/02/08/about-handling-fdo-exceptions/#comments</comments>
		<pubDate>Thu, 08 Feb 2007 17:36:16 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[fdo]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/2007/02/08/about-handling-fdo-exceptions/</guid>
		<description><![CDATA[Every one who has played with Feature Data Objects (FDO) using C++ knows that FDO uses exceptions pretty intensively. Therefore, it&#8217;s important to understand how to handle exceptions thrown by FDO properly and effectively. A good introductory about exceptions handling &#8230; <a href="http://mateusz.loskot.net/2007/02/08/about-handling-fdo-exceptions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Every one who has played with <a href="http://fdo.osgeo.org/">Feature Data Objects</a> (FDO) using C++ knows that FDO uses exceptions pretty intensively. Therefore, it&#8217;s important to understand how to <a href="http://en.wikipedia.org/wiki/Exception_handling">handle exceptions</a> thrown by FDO properly and effectively. A good introductory about exceptions handling can be found in <a href="http://fdo.osgeo.org/documentation.html">The FDO Developer&#8217;s Guide</a> document, under <em>Development Practices</em> and <em>Exception Handling</em> nodes. I&#8217;ll focus on practical examples here.</p>
<p><span id="more-176"></span></p>
<p>The first important thing to remember is that FDO uses its own <em>hierarchy of exceptions</em> with <a href="http://fdo.osgeo.org/files/fdo/docs/FDO_API/db/dee/class_fdo_exception.html">FdoException</a> class as a base. The FdoException does not use or depend on standard C++ exceptions with <em>std::exception</em> base class and it has to be handled in FDO specific way &#8211; catch by pointer and released:</p>
<pre class="brush: cpp; title: ; notranslate">try {
  // ...
}
catch (FdoException* ex) {
  // Handling procedure (see below)
  ex-&gt;Release();
}</pre>
<p>Second important thing and worth to remember is that FDO exceptions can nested. A source exception thrown in one place can be wrapped with new exception in <em>catch</em> clause on some level and re-thrown away. The new exception with can be caught on an upper level, wrapped and re-thrown again. Every such repetition of this <em>wrap and re-throw</em> operation nests source exception, together with associated message, in newly created. Here is a simple example presenting mechanism composing nested exceptions:</p>
<pre class="brush: cpp; title: ; notranslate">try {
  try {
    try {
      throw FdoException::Create(L&quot;First exception&quot;);
    }
    catch (FdoException* ex) {
      throw FdoException::Create(L&quot;Second caused by first&quot;, ex);
    }
  }
  catch (FdoException* ex) {
      throw FdoException::Create(L&quot;Third caused by second&quot;, ex);
  }
}
catch (FdoException* ex) {
  // Handling procedure (see below)
  ex-&gt;Release();
}</pre>
<p>Finally, it&#8217;s time to process queue of nested exceptions and output associated messages to a user. Below, catch clause completing the example above is presented. The output formatting is based on standard C++ streams:</p>
<pre class="brush: cpp; title: ; notranslate">#include &lt;sstream&gt;
#include &lt;string&gt;
#include &lt;iomanip try {
  // throwing and re-throwing exceptions
}
catch (FdoException* ex) {

  // message offset + asterix characters
  std::streamsize offset = 5;

  // used to compose error message
  std::wostringstream msg;
  msg &lt;&lt; L&quot;\n*** FDO FAILURE ***\n&quot;;
  msg &lt;&lt; std::setw(++offset)
        &lt;&lt; L&quot;*** &quot;
        &lt;&lt; ex-&gt;GetExceptionMessage()
        &lt; &lt; std::endl;

  FdoPtr&lt;FdoException&gt; cause(ex-&gt;GetCause());
  while(NULL != cause)
  {
    msg &lt; &lt; std::setw(++offset)
          &lt;&lt; L&quot;*** &quot;
          &lt;&lt; cause-&gt;GetExceptionMessage()
          &lt; &lt; std::endl;

    // get next exception from the queue
    cause = cause-&gt;GetCause();
  }
  ex-&gt;Release();

  std::wcout &lt; &lt; msg &lt;&lt; std::endl;
}</pre>
<p>The output message will look as follows:</p>
<p>
<pre>
*** FDO FAILURE ***
  *** Third caused by second
   *** Second caused by first
    *** First exception
</pre>
</p>
<p>The first, root, exception is processed as last and the last re-thrown exception is processed as first. As it&#8217;s observable, FDO nested exceptions are recorder in <a href="http://en.wikipedia.org/wiki/FIFO_and_LIFO_accounting">LIFO</a> queue order.</p>
<p>I hope this short explanation will be helpful to understand FDO exceptions. By the way, if you have any questions or proposals of articles about using <strong>Feature Data Objects with C++</strong>, please <a href="http://mateusz.loskot.net/contact/">drop me a note</a> about it. I&#8217;ll do my best to give some writings and examples here, so anyone can read about it.</p>
<p></iomanip></string></sstream></p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2007/02/08/about-handling-fdo-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FDO PostGIS turning point</title>
		<link>http://mateusz.loskot.net/2007/02/04/fdo-postgis-turning-point/</link>
		<comments>http://mateusz.loskot.net/2007/02/04/fdo-postgis-turning-point/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 01:24:46 +0000</pubDate>
		<dc:creator>mloskot</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[fdo]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://mateusz.loskot.net/2007/02/04/fdo-postgis-turning-point/</guid>
		<description><![CDATA[More than a week ago, after longer discussion in the FDO PostGIS team (Paul Ramsey, Jason Birch and I) we decided about a turning point in the development of PostGIS provider for FDO. The most important part of our decision &#8230; <a href="http://mateusz.loskot.net/2007/02/04/fdo-postgis-turning-point/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>More than a week ago, after longer discussion in the <a href="http://fdo.osgeo.org/">FDO</a> PostGIS team (<a href="http://geotips.blogspot.com/">Paul Ramsey</a>, <a href="http://www.jasonbirch.com/">Jason Birch</a> and <a href="http://mateusz.loskot.net/">I</a>) we decided about a turning point in the development of <a href="http://postgis.refractions.net/">PostGIS</a> provider for FDO. The most important part of our decision is about dropping the <a href="http://fdo.osgeo.org/fdordbms/index.html">Generic RDBMS</a> framework as an intermediate API for the provider and implementing FDO core interface directly.
</p>
<p>What is the <em>Generic RDBMS</em> framework:</p>
<blockquote><p>The Generic RDBMS project provides FDO with access to RDBMS systems through a generic framework that allows code reuse and reduces the development time for creating new FDO providers.</p></blockquote>
<p><span id="more-174"></span></p>
<p>I&#8217;ve been working with the Generic RDBMS and learning its internals straight from the code long weeks. It wasn&#8217;t easy due to fact <a href="http://www.foss4g2006.org/contributionDisplay.py?contribId=211&#038;sessionId=42&#038;confId=1" title="FDO: Street Vendors in the Cathedral">it feels big</a> and also because it&#8217;s not friendly documented for users yet. Nevertheless, I can say I&#8217;ve became familiar with internals of Generic RDBMS quite well.</p>
<p>Recently, I&#8217;ve started to experience <a href="http://lists.osgeo.org/pipermail/fdo-internals/2007-January/000542.html">some</a> difficulties and <a href="http://lists.osgeo.org/pipermail/fdo-internals/2007-January/000563.html">limitations</a> of the Generic RDBMS layer. I faced all these problems while adding support of another DBMS engine &#8211; <a href="http://www.postgresql.org/">PostgreSQL</a> &#8211; to the Generic RDBMS layer and it&#8217;s internal components like RDBI and GDBI  (the PostgreSQL is not yet supported by Generic RDBMS, so it was obvious for me I need to implement it in order to develop PostGIS provider).</p>
<p><a href="http://lists.osgeo.org/pipermail/fdo-internals/2007-January/000657.html">Follow this link</a> to read <em>the turning point</em> announcement posted by Paul on the fdo-internals mailing list, in which you can find more details about the rationale of our decision.</p>
<p>As a conclusion of my experiences from using Generic RDBMS, here is my personal summary of reasons why it&#8217;s important to analyse this framework in details before making a final choice (random order):</p>
<ul>
<li>Every DBMS engine is specific and it&#8217;s worth to consider specific solution.</li>
<li>It&#8217;s not possible to develop a database abstraction layer for every kind of application.</li>
<li>The Generic RDBMS <em>makes</em> some decisions first and they should be analysed before attempting to implement new provider to find if these decisions won&#8217;t become limitations.</li>
<li>The Generic RDBMS forces a provider to require existence of FDO Meta Schema &#8211; a set of predefined tables</li>
<li>Workarounds for decisions made by Generic RDBMS are mostly based on bringing and extending new level(s) of abstraction.</li>
<li>The former point leads to increase of complexity of the solution.</li>
<li>The FDO is complex and <em>feels big</em>. The Generic RDBMS framework increases this complexity.</li>
<li>It&#8217;s probably easier to achieve optimal performance with very specific solution, so the Generic RDBMS might cause another limitations in this area.</li>
<li>IMHO, there are too many abstraction levels in the Generic RDBMS itself (RDBI, DBI, GDBI, &#8230;)</li>
<li>Creating new FDO provider by directly implementing FDO core interfaces <a href="#note"><strong>is</strong></a>: easier to develop, easier to test and debug, maintainer friendly and it <a href="#note"><strong>may be</strong></a> more robust.</li>
</ul>
<p><a name="note"></a></p>
<p><em>I can confirm it&#8217;s easier because I&#8217;ve been developing on new generation of PostGIS provider for more than a week. I suppose thin implementation of FDO core interfaces will be faster because of use of as little abstraction levels as possible.</em></p>
<p>I&#8217;m not against of the idea of abstraction layers for DBMS and I&#8217;m not against the idea of the Generic RDBMS framework for FDO. Better, I like the concept. I&#8217;m a member of development team of <a href="http://soci.sourceforge.net/">SOCI</a> library &#8211; a database access library for C++. It&#8217;s a simple abstraction providing common layer for SQL queries execution and fetching query results. I&#8217;d call SOCI as a pretty simple example of common denominator for various DBMS and even that we&#8217;ve experienced number of problems and limitations resulting from specific nature of various database engines. So, developing <strong>usable</strong> and extensible abstraction above yet more complex system is tricky for sure, but may be impossible too.</p>
<p>I know there are some users waiting for the PostGIS provider for FDO. I&#8217;d like to apologise all of you waiting for it for the significant delay. I&#8217;m sure our latest decision about the turning point will favourably influence the PostGIS provider development and make the release date closer.</p>
]]></content:encoded>
			<wfw:commentRss>http://mateusz.loskot.net/2007/02/04/fdo-postgis-turning-point/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

