<?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>Random Nodes &#187; Open Source</title>
	<atom:link href="http://www.jasonbirch.com/nodes/category/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonbirch.com/nodes</link>
	<description>...Jason Birch's geospatial ramblings</description>
	<lastBuildDate>Wed, 01 Sep 2010 05:14:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>OSGeo BC Meet-Up July 27 (during GeoWeb)</title>
		<link>http://www.jasonbirch.com/nodes/2010/06/21/507/osgeo-bc-meet-up-july-27-during-geoweb/</link>
		<comments>http://www.jasonbirch.com/nodes/2010/06/21/507/osgeo-bc-meet-up-july-27-during-geoweb/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 00:42:30 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[Advocacy]]></category>
		<category><![CDATA[OSGeo]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[BC Local Chapter]]></category>
		<category><![CDATA[GeoWeb]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=507</guid>
		<description><![CDATA[Martin recently announced that we will be holding an OSGeo British Columbia meet-up in Vancouver on July 27. We have timed this to coincide with GeoWeb; it falls on the Tuesday evening after the workshops are over and before the conference sessions start. This session is open to all, so if you&#8217;re going to be [...]]]></description>
			<content:encoded><![CDATA[<p>Martin <a href="http://lists.osgeo.org/pipermail/osgeo-bc/2010-June/000168.html">recently announced</a> that we will be holding an OSGeo British Columbia meet-up in Vancouver on July 27.  We have timed this to coincide with <a href="http://geowebconference.org/">GeoWeb</a>; it falls on the Tuesday evening after the workshops are over and before the conference sessions start.</p>
<p>This session is open to all, so if you&#8217;re going to be at GeoWeb, or are in the area and want to hang out and eat pizza with some <strong>Cool GeoGeeks</strong> (oxymoron?) <a href="http://wiki.osgeo.org/wiki/British_Columbia_Chapter_Meeting_2010-07-27">RSVP on the wiki</a>!</p>
<p>We&#8217;re also looking for some presentation ideas; if you&#8217;ve got a burning desire, then please propose a topic on the wiki.</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2010/06/21/507/osgeo-bc-meet-up-july-27-during-geoweb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StackOverflow For Geo!</title>
		<link>http://www.jasonbirch.com/nodes/2010/06/14/443/stackoverflow-for-geo/</link>
		<comments>http://www.jasonbirch.com/nodes/2010/06/14/443/stackoverflow-for-geo/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 05:05:23 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[Advocacy]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[geospatial]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[StackOverflow]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=443</guid>
		<description><![CDATA[If you&#8217;re not familiar with StackOverflow, it&#8217;s a collaboratively edited questions and answers site for developers. With its wiki-like editing and community voting and reputation system, answers at StackOverflow (and its sister sites like ServerFault) are more complete, accurate, and accessible than any other technical resources. With this understanding, I was excited to see that [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re not familiar with <a href="http://stackoverflow.com/">StackOverflow</a>, it&#8217;s a collaboratively edited questions and answers site for developers.  With its wiki-like editing and community voting and reputation system, answers at StackOverflow (and its sister sites like <a href="http://serverfault.com/">ServerFault</a>) are more complete, accurate, and accessible than any other technical resources.</p>
<p>With this understanding, I was excited to see that George Silva was involved in StackExchange&#8217;s incubator, and had put together a proposal for a <a href="http://area51.stackexchange.com/proposals/1425/geographic-information-systems?referrer=MuXIfRDxg2AN5QfMOt5KEg2">StackOverflow for Geographic Information Systems</a>.  </p>
<p><a href="http://area51.stackexchange.com/proposals/1425/geographic-information-systems?referrer=MuXIfRDxg2AN5QfMOt5KEg2"><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/06/StackExchange4Geo2.png" alt="" title="StackExchange4Geo2" width="500" height="183" class="alignnone size-full wp-image-446" /></a></p>
<p>GIS has long been more of a diaspora than an online community, with information stored across dozens of mailing lists, forums, blogs and other locations.  Each open source project and proprietary application has its own set of resources, as do academic communities.  Answers have been hard to find, and expert participation in these communities can quickly lead to burn-out.  I believe that having a StackOverflow for GIS will help to solve these problems, and increase our individual efficiency working with GIS.</p>
<p>If you agree, please take the time to sign up for George&#8217;s proposal, and commit to being involved in <a href="http://area51.stackexchange.com/proposals/1425/geographic-information-systems?referrer=MuXIfRDxg2AN5QfMOt5KEg2">StackOverflow for GIS</a>!</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2010/06/14/443/stackoverflow-for-geo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MapGuide Maestro 2.0: now with more Maestro!</title>
		<link>http://www.jasonbirch.com/nodes/2010/03/10/398/mapguide-maestro-2-0-now-with-more-maestro/</link>
		<comments>http://www.jasonbirch.com/nodes/2010/03/10/398/mapguide-maestro-2-0-now-with-more-maestro/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 06:26:58 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[MapGuide]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[MapGuide Maestro]]></category>
		<category><![CDATA[OSGeo]]></category>
		<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=398</guid>
		<description><![CDATA[Kenneth Skovhede recently announced the official release of MapGuide Maestro 2.0, the culmination of over a year of feature development and usability enhancements to the open source MapGuide authoring tool. Here are my picks for the top 10 features of MapGuide Maestro 2.0: 1. Theming, with ColorBrewer Suport Being able to theme maps based on [...]]]></description>
			<content:encoded><![CDATA[<p>Kenneth Skovhede recently <a href="http://lists.osgeo.org/pipermail/mapguide-users/2010-March/021675.html">announced</a> the official release of <a href="http://trac.osgeo.org/mapguide/wiki/maestro">MapGuide Maestro</a> 2.0, the culmination of over a year of feature development and usability enhancements to the open source MapGuide authoring tool.  Here are my picks for the top 10 features of MapGuide Maestro 2.0:</p>
<p><strong>1. Theming, with ColorBrewer Suport</strong></p>
<p>Being able to theme maps based on data distribution is a basic mapping function, and this release of Maestro delivers.  Adding support for <a href="http://colorbrewer2.org/">ColorBrewer</a> means that you can be confident that your colour scheme is visually distinct and cartographically appropriate for the message that you are conveying.  The Maestro UI automatically constrains the colour choices based on the underlying data categories:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/ColorBrewer.png" alt="" title="ColorBrewer" width="392" height="397" class="alignnone size-full wp-image-401" /></p>
<p><strong>2. Expression Editor</strong></p>
<p>MapGuide and the underlying FDO data providers support a powerful expression language, and previously you were on your own to write valid expressions.  Thanks to <a href="http://themapguyde.blogspot.com/">Jackie Ng</a>, MapGuide Maestro was able to use the same expression editor that FDO Toolbox is using, giving expression-completion, valid value extraction, and more:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/ExpressionEditor.png" alt="" title="ExpressionEditor" width="497" height="300" class="alignnone size-full wp-image-413" /></p>
<p>Check out Jackie&#8217;s posts on the <a href="http://themapguyde.blogspot.com/2009/07/expression-editor-gets-bit-smarter.html">FDO Expression Editor</a> and the follow-up where he talks about the <a href="http://themapguyde.blogspot.com/2009/09/fdo-toolbox-v082.html">addition of value auto-completion</a>.</p>
<p><strong>3. Resource Validation</strong></p>
<p>The Maestro resource validator walks from application to map to layers to data, warning if it detects any common errors such as broken references or potential performance issues like unmatched projections.  This is an invaluable tool for troubleshooting problems in your maps:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/Validator_1.png" title="Validator_1" alt="Resource Validator Init" width="268" height="133" class="alignnone size-full wp-image-399" /></p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/Validator_2.png" alt="Resource Validator Results" title="Validator_2" width="603" height="303" class="alignnone size-full wp-image-400" /></p>
<p><strong>4. Improved XML Editor</strong></p>
<p>While Maestro&#8217;s GUI is great for most purposes, there are times when you need to access the full power of MapGuide XML configuration syntax, like when you&#8217;re editing complex XML-based stylization elements.  Maestro makes it easy for you to edit any resource as XML simply by right-clicking on it and choosing &#8220;Edit as xml&#8221;.  Maestro 2.0 comes with many improvements to the XML editor, including validation against the schema, cursor position (important when tracking down errors), and the ability to attach arbitrary files to the current resource, which is critical when making bitmap-based symbols:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/XML_Editor.png" alt="" title="XML_Editor" width="618" height="427" class="alignnone size-full wp-image-405" /></p>
<p><strong>5. Profiling</strong></p>
<p>Profiling allows you to easily find the performance bottlenecks on a given map, or quickly determine whether changes to theming or other items are having an impact on performance:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/Profiler_Init.png" alt="" title="Profiler_Init" width="123" height="56" class="alignnone size-full wp-image-406" /></p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/Profiler_Output.png" alt="" title="Profiler_Output" width="191" height="84" class="alignnone size-full wp-image-407" /></p>
<p><strong>6. Package Management</strong></p>
<p>MapGuide packages are a zipped export of the DBXML repository including XML resources, associated binary files, and a manifest.  Typically these are managed on the server, but Maestro allows you to create, edit, and load these files via the GUI. This can be really handy when you&#8217;re migrating changes between servers.  One of my favourite tricks is to export both test and prod as packages, unzip them, and compare using <a href="http://www.scootersoftware.com/">Beyond Compare</a> (not free, but worth every penny).</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/PackageMenu.png" alt="" title="PackageMenu" width="250" height="96" class="alignnone size-full wp-image-411" /></p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/PackageCreator.png" alt="" title="PackageCreator" width="692" height="324" class="alignnone size-full wp-image-410" /></p>
<p><strong>7. Custom Resource Templates</strong></p>
<p>Any time you are creating a new data source, layer definition, map definition, etc, you are basically just creating a new XML document.  If you find that you are always performing certain steps as part of creating these resources, you can create your own custom resource types with customized versions of these XML documents.  For instance, I like to start layer creation using the version 1.3 of the LayerDefinition schema, with a default scale range of 1:1->1:500,000, and none of the feature types being displayed.  All I had to do was create a new LayerDefinition with these settings, save it to the MapGuideMaestro\Templates directory with a name like &#8220;Nanaimo Layer.xml&#8221;, and it shows up when I want to create a new resource:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/NewCustomResource.png" alt="" title="NewCustomResource" width="415" height="276" class="alignnone size-full wp-image-412" /></p>
<p><strong>8. Duplicate Resource</strong></p>
<p>This might not seem like a big deal, but when creating dozens of similar layers it can be a huge timesaver.  Simply right-click on any resource and choose &#8220;Duplicate&#8221; and a copy of that resource is created and ready for you to customize:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/Duplicate2.png" alt="" title="Duplicate" width="312" height="353" class="alignnone size-full wp-image-427" /></p>
<p><strong>9. Colour-Coded Resource Tree</strong></p>
<p>When editing many resources at once, things can get a bit confusing.  Crispin Hoult from <a href="http://www.1spatial.com/">1Spatial</a> contributed a feature that colour-codes currently open resources in green, and resources that have unsaved changes in pink. The currently active resource comes up in a darker shade.  This feature makes it much easier to keep track of what&#8217;s going on in your work area, and is surprisingly useful:</p>
<p><img src="http://www.jasonbirch.com/nodes/wp-content/uploads/2010/03/ColourCoding.png" alt="" title="ColourCoding" width="225" height="147" class="alignnone size-full wp-image-424" /></p>
<p><strong>10. General Usability</strong></p>
<p>OK, maybe this doesn&#8217;t count as a feature, but a LOT of thought has been put into how various user interactions work, and countless small refinements have been made.  A few examples: </p>
<ul>
<li>inserting a new layer into a map definition when you have a group selected inserts the layer into that group, and places the layer into the overall draw order right after the bottom-most layer in that group
</li>
<li>you can now right-click on any resource and copy its ID (like Library://Nanaimo/Data/MyFile.FeatureSource) to the clipboard, which can be incredibly useful when writing code to access resources</li>
<li>you can multi-select many layers for insertion into a MapDefinition at once</li>
<li>maestro keeps track of references when you rename or move resources, prompting you for whether you want dependent resources updated</li>
</ul>
<p>All of the little enhancements in this release added together have saved me hours of work (I&#8217;ve been using the pre-release versions for a few months).</p>
<p>All-in-all this is a very impressive release, with countless new features and enhancements to existing functionality.  Give it a spin, and I&#8217;m sure you&#8217;ll turn up your own favourites!</p>
<p>Thanks Kenneth, and great work.</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2010/03/10/398/mapguide-maestro-2-0-now-with-more-maestro/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Nanaimo meet OpenID. OpenID meet Nanaimo.</title>
		<link>http://www.jasonbirch.com/nodes/2009/10/06/375/nanaimo-meet-openid-openid-meet-nanaimo/</link>
		<comments>http://www.jasonbirch.com/nodes/2009/10/06/375/nanaimo-meet-openid-openid-meet-nanaimo/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 06:44:13 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[Nanaimo]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[opendata]]></category>
		<category><![CDATA[opengov]]></category>
		<category><![CDATA[openid]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=375</guid>
		<description><![CDATA[How&#8217;s that for protocol? If you&#8217;re anything like me, you probably use the password reset function on websites more often than the login function. This is a huge problem, both for security and for user experience. The City of Nanaimo recognized that as useful as the city&#8217;s web applications are, requiring citizens to remember yet [...]]]></description>
			<content:encoded><![CDATA[<p>How&#8217;s that for protocol?</p>
<p>If you&#8217;re anything like me, you probably use the password reset function on websites more often than the login function.  This is a huge problem, both for security and for user experience.</p>
<p>The City of Nanaimo recognized that as useful as the city&#8217;s web applications are, requiring citizens to remember yet another password is not reasonable.  Early this year the city did an initial analysis of OpenID, and <a href="http://phansoft.blogspot.com/">Jeff Jacob</a>&#8211;one of my colleagues&#8211;took on the task of developing the infrastructure to support OpenID and one of the first applications to take advantage of it.  You can read the <a href="http://www.nanaimo.ca/EN/main/departments/106/openid.html">everyman&#8217;s description of Nanaimo&#8217;s OpenID initiative</a> along with links to the OpenID-enabled services.</p>
<p>While the majority of users probably have an OpenID account already, it would not be responsible to require citizens to sign up for an external login service.  A mix of forms-based and OpenID login capabilities may have been easier, but it just made more sense for Jeff to implement a <a href="https://id.nanaimo.net/">city-specific OpenID provider</a> using the <a href="http://code.google.com/p/dotnetopenid/">DotNetOpenID</a> open source library.  This allows Nanaimo&#8217;s application login class to be more streamlined while presenting a consistent user experience, but more importantly it allows the city to act as a provider for third party / COTS web applications as these start supporting OpenID.  Eventually Nanaimo citizens will be able to log into all city services using a single ID of their choice.</p>
<p>It is gratifying to see that during the City&#8217;s implementation phase many other organisations, such as the <a href="http://www.idmanagement.gov/drilldown.cfm?action=openID_openGOV">US Federal Government</a>, have been <a href="http://openid.net/government/">embracing</a> OpenID.  Allowing citizens to access services using their own credentials is a key part of Nanaimo&#8217;s longstanding policy of providing easy access to the information residents and businesses need to live and do business here.</p>
<p>If you work for a local government and are interested in sharing information and/or code, please get in touch with Nanaimo&#8217;s IT department!</p>
<p>-J</p>
<p>P.S. As always, I am writing from a personal perspective. Opinions here are my own, and are not necessarily shared by my employer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2009/10/06/375/nanaimo-meet-openid-openid-meet-nanaimo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FWTools FTW &#8230; because GDAL FTW didn&#8217;t sound as cool!</title>
		<link>http://www.jasonbirch.com/nodes/2009/08/11/290/fwtools-ftw-gdal/</link>
		<comments>http://www.jasonbirch.com/nodes/2009/08/11/290/fwtools-ftw-gdal/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 07:32:16 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[MapGuide]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[FWTools]]></category>
		<category><![CDATA[GDAL]]></category>
		<category><![CDATA[Nanaimo]]></category>
		<category><![CDATA[NanaimoMap]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=290</guid>
		<description><![CDATA[I’ve received a bunch of compliments on the performance of the NanaimoMap application that the City of Nanaimo launched last week.  There is a lot involved in making a web map perform.  Hardware, vector generalization, and underlying mapping technology all play a role, but one of the most important parts of any successful web map is raster data optimization.  Read on to find out how FWTools (and GDAL) allowed me to handle this with ease.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve received a bunch of compliments on the performance of the <a href="http://maps.nanaimo.ca/nanaimomap/" title="Nanaimo Map">NanaimoMap</a> <a href="http://mapguide.osgeo.org/">MapGuide</a> / <a href="http://trac.osgeo.org/fusion">Fusion</a> application that the <a href="http://www.nanaimo.ca/">City of Nanaimo</a> <a href="http://www.jasonbirch.com/nodes/2009/08/10/328/nanaimomap-testers-wanted/">launched in beta</a> last week.</p>
<p>There is a lot involved in making a web map perform, especially if you are not leveraging tile caching.  One part of the story is hardware, and I&#8217;m lucky enough to share space on a dual quad-core machine with 4GB RAM and relatively fast disk. Another part is proper generalization of the vector data for display; no point in carrying sub-micron precision on a map that will generally be displayed at 1:500 or smaller. And of course, there&#8217;s MapGuide&#8217;s inherent speed when properly configured. This leaves out one of the most important parts though: raster data.  </p>
<p>Raster data is big, brutish and hard to work with, and optimizing raster access is often one of the most important parts of delivering a successful web map.  Users have come to expect &#8220;satellite&#8221; imagery on their web maps, and complain when it doesn&#8217;t perform as well as Google Maps.  One of the best ways that I have found of flipping and folding raster data is Frank Warmerdam&#8217;s <a href="http://fwtools.maptools.org/">FWTools</a>, which wraps <a href="http://www.gdal.org/">GDAL</a> and some other utilities in a single easy-to-use package.</p>
<p>My starting point consisted of:</p>
<ul>
<li>  79 TIFF + Worldfile images, 10cm resolution, about 1.1GB each</li>
<li>  14 TIFF + Worldfile images, 30cm resolution, about 600MB each</li>
</ul>
<p>So, I was working with about 100GB of images, none of which were optimized for web-based display, and which did not contain the spatial reference information that the FDO Raster Provider (also based on GDAL!) works best with.</p>
<p>The first thing I did was set up a batch process to optimize the individual images.  This involved three steps:</p>
<p>1. Obtain a correct .prj file containing the WKT spatial reference information for my images.  The easiest place for me to get this was  <a href="http://spatialreference.org/">SpatialReference.org</a>, but you might just have one hanging around.</p>
<blockquote><p><a href="http://spatialreference.org/ref/epsg/26910/">http://spatialreference.org/ref/epsg/26910/</a></p></blockquote>
<p>2. Reprocess the image into a Tiled GeoTIFF, with no compression and a relatively large internal block size, and specifying the projection file obtained above.  The caret (^) is the DOS line continuation character:</p>
<p><code>gdal_translate   ^<br />
    -co "TILED=YES"   ^<br />
    -co "PROFILE=GEOTIFF"   ^<br />
    -co "INTERLEAVE=BAND"   ^<br />
    -co "BLOCKXSIZE=512"   ^<br />
    -co "BLOCKYSIZE=512"  ^<br />
    -a_srs utm83-10.prj  ^<br />
    infile.tif   ^<br />
    outfile.tif<br />
</code></p>
<p>You can obtain more information on <a href="http://gdal.org/gdal_translate.html">gdal_translate</a> and the <a href="http://gdal.org/frmt_gtiff.html">GeoTIFF options</a> on the GDAL website.  Depending on your source data and intended use, other values could be more appropriate, and you really should experiment.</p>
<p>3. Create internal pyramids in each image so that the entire image does not need to be fetched when zoomed out.  This is one of the easiest performance gains you can get if you can afford the extra disk space. </p>
<p><code>gdaladdo -r gauss output.tif 2 4 8 16 32 64 128<br />
</code></p>
<p>Once this was done, I had a really decent set of fast images to work with, but these would only be appropriate to load at large scales when only one or a very few of the images need to be opened on each map view.  For smaller scales, I needed to reduce the size of the images being processed, and also reduce the number of files being accessed on each fetch.  I decided to go with a simple two-tier approach:  Load the individual images at scales larger than some fixed value, and load a single overview image at scales smaller than that value.  </p>
<p>The only problem was that I did not have an appropriate overview image.  I wanted something that was relatively small, highly optimized, and which had white fill in its nodata areas.  Fortunately GDAL and the awesome folks in the #gdal channel at freenode came to the rescue again, this time with four steps.</p>
<p>1. The first thing I needed to do was build a list of all of the images I wanted to have as part of the overview and feed these into the <a href="http://gdal.org/gdalbuildvrt.html">gdalbuildvrt</a> command to build a single <a href="http://www.gdal.org/gdal_vrttut.html">virtual image</a>.  You could do this manually, but I have the awesome <a href="http://gnuwin32.sourceforge.net/">GnuWin32</a> utilities installed so used these instead; they&#8217;re almost enough to make me not miss the days when I spent most of my time in Unix:</p>
<p><code>find images/ -name "*.tif" | xargs gdalbuildvrt -resolution highest all_images.vrt<br />
</code></p>
<p>2. Because I wanted a white background on my overviews, I then edited the all_images.vrt, adding a &lt;NoDataValue/&gt; section at the top of each of the three &lt;VRTRasterBand /&gt; sections:</p>
<p><code>  &lt;VRTRasterBand dataType="Byte" band="1"&gt;<br />
    &lt;NoDataValue>255&lt;/NoDataValue&gt;<br />
</code></p>
<p>3. The <a href="http://gdal.org/gdalinfo.html">gdalinfo</a> command gave me the dimensions of the virtual image, each of which I then divided iteratively to give me reasonable overview dimensions which I could feed into gdal_translate.</p>
<p><code>gdal_translate   ^<br />
    -outsize 53120 14000   ^<br />
    -co "TILED=YES"   ^<br />
    -co "PROFILE=GEOTIFF"   ^<br />
    -co "INTERLEAVE=BAND"   ^<br />
    -co "BLOCKXSIZE=512"   ^<br />
    -co "BLOCKYSIZE=512"   ^<br />
    all_images.vrt   ^<br />
    all_images.tif<br />
</code></p>
<p>When this completed, I deleted the all_images.tif.aux.xml file because I did not want to carry the additional metadata that GDAL maintains in that file.  </p>
<p>Careful with sizes here.  If you&#8217;re using an application that supports it, you can specify the -CO &#8220;BIGTIFF=YES&#8221; option to generate files larger than 4GB, but you&#8217;re likely better off generating an intermediate level of aggregated and resampled tiles instead.</p>
<p>4. The final step was to once again generate internal pyramids to allow for better performance at small scales:</p>
<p><code>gdaladdo -r gauss all_images.tif 2 4 8 16 32 64 128<br />
</code></p>
<p>Once these two data sets were processed, I simply used <a href="http://trac.osgeo.org/mapguide/wiki/maestro">MapGuide Maestro</a> to make two raster data connections.  For the first data connection, I added all of the individual TIFF images to a composite raster type, and Maestro generated a configuration document which allows MapGuide to know which image to access for a given extent.  For the second layer, I just pointed to the overview GeoTiff.  I then created layers for these, experimented until I found the scale where the overview image started looking pixelated, and set the layers&#8217; view scale properties accordingly.  There are some notes on <a href="http://trac.osgeo.org/mapguide/wiki/maestro/UserGuides/RasterFeatureSource"> working with rasters</a> in the Maestro documentation.</p>
<p>More performance could probably be gained by having an intermediate level where the coverage area was aggregated into larger tiles before being combined into one large overview image, but for the initial launch this was deemed to have high enough performance.</p>
<p>On my production server, I&#8217;m lucky enough to have a fast, high-spindle-count RAID shelf dedicated to storing these uncompressed TIFFs, and they scream off the disk.  My test server is VMWare-based, and disk performance and space are both at a premium.  In this case, I still used the TIFF overview map, but at large scales I access a set of tiled MrSID files instead.  This seemed like a decent compromise given the constraints, but did seem to thrash the CPU a bit.</p>
<p>GDAL was one of the first open source geospatial applications I tried (not counting GRASS and MOSS) and is constantly coming in handy, whether I&#8217;m reprojecting, adding spatial reference information to images, or converting between formats.</p>
<p>Thanks to hobu (Howard Butler), FrankW (Frank Warmerdam) and EvenR (Even Rouault) from the #gdal IRC channel on freenode for helping me work my way to this solution.  Amazing support!</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2009/08/11/290/fwtools-ftw-gdal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>On the Shoulders of Giants?</title>
		<link>http://www.jasonbirch.com/nodes/2009/08/11/334/on-the-shoulders-of-giants/</link>
		<comments>http://www.jasonbirch.com/nodes/2009/08/11/334/on-the-shoulders-of-giants/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 05:39:59 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[Advocacy]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=334</guid>
		<description><![CDATA[I was recently reading a post by Gordon Luckett about how he&#8217;s been able to use Google Maps and Bing layers in MapGuide / Fusion maps. This is only possible because the Fusion project decided to build on top of OpenLayers, and recent builds of Fusion have enabled the OpenLayers commercial base maps. This got [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently reading a post by Gordon Luckett about how he&#8217;s been able to use <a href="http://mapguide.wordpress.com/2009/08/10/experimenting-with-googlevirtual-earth-and-mapguide/">Google Maps and Bing layers in MapGuide</a> / <a href="http://trac.osgeo.org/fusion/">Fusion</a> maps.  This is only possible because the Fusion project decided to build on top of <a href="http://www.openlayers.org/">OpenLayers</a>, and recent builds of Fusion have enabled the OpenLayers commercial base maps.</p>
<p>This got me to thinking about the amount of work that the <a href="http://mapguide.osgeo.org/">MapGuide</a> project is leveraging every time you see a map.  MapGuide directly includes about a dozen open source libraries.  Many of these (such as <a href="http://fdo.osgeo.org/">FDO</a>, <a href="http://www.gdal.org/">GDAL</a>, <a href="http://www.libgd.org/Main_Page">GD</a> and Fusion) have their own stack of libraries that they depend on.  With a bit of digging, I quickly ended up over 30&#8211;I&#8217;m sure I could have gone further&#8211;and this doesn&#8217;t even count the open source utilities such as <a href="http://gcc.gnu.org/">GCC</a>, <a href="http://ant.apache.org/">Ant</a> and <a href="http://www.swig.org/">SWIG</a> that are integral to turning all of this code into something you can use.</p>
<p>I guess what I&#8217;m trying to say is that no matter how cool your code is, you&#8217;re really just the tip of the iceberg.  We&#8217;re not standing on the shoulders of giants, we&#8217;re standing on the shoulders of thousands of regular people who have dedicated their time to help build this ecosystem.  We have to make sure that we in turn enhance other projects where possible, and provide a solid base for those who come to build on our work in the future.</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2009/08/11/334/on-the-shoulders-of-giants/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NanaimoMap Testers Wanted</title>
		<link>http://www.jasonbirch.com/nodes/2009/08/10/328/nanaimomap-testers-wanted/</link>
		<comments>http://www.jasonbirch.com/nodes/2009/08/10/328/nanaimomap-testers-wanted/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 17:52:36 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[MapGuide]]></category>
		<category><![CDATA[Nanaimo]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Fusion]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=328</guid>
		<description><![CDATA[The City of Nanaimo is launching our new MapGuide Open Source / Fusion based map in beta. I&#8217;d love to see some feedback from testers, and to get help generating some real-world usage patterns. You can only do so much with canned load tests. If you&#8217;ve got a few minutes to play with it, please [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.nanaimo.ca/">City of Nanaimo</a> is launching our new <a href="http://mapguide.osgeo.org/">MapGuide Open Source</a> / <a href="http://trac.osgeo.org/fusion/">Fusion</a> based map in beta.  I&#8217;d love to see some feedback from testers, and to get help generating some real-world usage patterns.  You can only do so much with canned load tests.</p>
<p>If you&#8217;ve got a few minutes to play with it, please join us here:</p>
<p><a title="Nanaimo Map" href="http://maps.nanaimo.ca/nanaimomap/">NanaimoMap</a> Beta</p>
<p>It&#8217;s in beta because of the issues that will likely be shaken out by more widespread use, and because we have not yet built out the layers and search functionality required to match our current MapGuide 6.5 ActiveX-based mapping portal CityMap.  This will be completed before the end of the year.</p>
<p>Thanks!</p>
<p>-J</p>
<p>P.S. This application was developed by <a href="http://www.dmsolutions.ca/">DM Solutions Group</a>.  We&#8217;re running Fusion 1.1 with the latest test build (r4114) of MapGuide.  We wouldn&#8217;t have been able to launch&#8211;even in beta&#8211;without some last minute fixes by Trevor Wekel of <a href="http://www.otxsystems.com/">OTX Systems</a> and Haris Kurtagic of <a href="http://www.sl-king.com/">SL King</a>.  From a personal perspective, these guys are both amazing to work with, moderately priced for the value they offer, and are great resources if you&#8217;re stuck with a problem in MapGuide core that you can&#8217;t fix on your own.  As always, the opinions offered on this blog are my own, not necessarily those of my employer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2009/08/10/328/nanaimomap-testers-wanted/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Do You See Spiders? Making Government Data Truly Open</title>
		<link>http://www.jasonbirch.com/nodes/2009/08/03/312/do-you-see-spiders-making-government-data-truly-open/</link>
		<comments>http://www.jasonbirch.com/nodes/2009/08/03/312/do-you-see-spiders-making-government-data-truly-open/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 06:01:15 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[Advocacy]]></category>
		<category><![CDATA[Open Data]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[open government]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=312</guid>
		<description><![CDATA[The trend toward open government data is amazing, but does not go far enough. In addition to publishing downloadable data and open interfaces, government needs to learn from successful commercial websites and bring their "Deep Web" data to ... 
]]></description>
			<content:encoded><![CDATA[<p>The trend towards open government data is growing, with recent developments like <a href="http://www.data.gov/">Data.Gov</a> and Vancouver&#8217;s <a href="http://eaves.ca/2009/05/14/vancouver-enters-the-age-of-the-open-city/">Open3</a> motion, but these simply do not go far enough.  In addition to publishing downloadable data and open interfaces, government needs to learn from successful commercial websites and bring their &#8220;Deep Web&#8221; data to the surface.</p>
<p>The internet search experience is constantly evolving.  In the early days it was normal to search for a single keyword, be redirected to an authoritative website, and then explore that site to find what you were really looking for.  As the search engines became smarter and publishers learned to expose their database records as individual web pages, people have learned to search for more specific information.  For instance, searching for the name of a book will take you to an Amazon or Wikipedia entry for that book. Searching for the name of a current release movie will get you local show times and the name of the theatre it&#8217;s playing at.</p>
<p>Unfortunately, government has largely failed to recognise this change, and an entrenched tendency to develop stateful applications and portals is making the problem worse.  As an example, try searching for <a href="http://www.google.com/search?q=6368227+patent">US patent number 6368227</a>.  You will likely find a few results from ad-driven private websites that were re-publishing the government data, and maybe a broken link to the official patent search.  Why bother publishing your information online if you are going to do so in a way that holds it apart from the web?</p>
<p>The good news is that fixing this problem is not hard.  The search engines already assign a lot of authority to government sites, so you&#8217;re already a step ahead of commercial sites facing the same problem.  Just follow a few simple suggestions that the rest of the web has already figured out for us:</p>
<ul>
<li>Publish each well-formatted record to a consistent location on the web that will not change.  This allows both people and search engines to come back to these records whenever they want.<br />&nbsp;</li>
<li>Ensure that search engine spiders have a way of following basic hyperlinks to find this information.  This can be either a simple paged set of results, or a more complex hierarchical system if the data allows.<br />&nbsp;</li>
<li>Generate <a href="http://www.sitemaps.org/">SiteMaps</a> that link to all of your records as cheap insurance to make sure that the search engines can find all of your content.  Be careful to pay attention to the maximum size, and break your data up into multiple sitemaps if necessary.<br />&nbsp;</li>
<li>Make use of clear and logical metadata such as Title, Description and <a href="http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html">Canonical</a> tags to ensure that both search engines and your prospective searchers can make sense of the results.  Nothing worse than publishing a record with an HTML title like &#8220;32432-43A&#8221;.  Nobody is going to click on that!<br />&nbsp;</li>
</ul>
<p>Do we still need to build applications? Absolutely! Sometimes free text search across the entire web does not offer enough granularity.  Do we still need to make data and services available to third parties?  Definitely! There are lots of smart people out there who can use our data to help make the world a better place.  However, these are secondary to the single most effective way we have of giving citizens access to the data we maintain on their behalf. Our highest level of service can be delivered by being <strong>of</strong> the web, not just <strong>on</strong> the web.</p>
<p>Oh, and since this is a geospatial blog:  Just because your data is in a GIS, don&#8217;t think you can avoid doing something about this.  Spatial search is still nowhere near as powerful as general web search, but it&#8217;s getting better all the time.  Government geodata needs to be published as web pages too.</p>
<p>For some concrete examples of the benefits of becoming part of the web, check out a slide show that I recently published as &#8220;<a href="http://www.slideshare.net/JasonBirch/moving-beyond-the-desk">Moving Beyond the Desk</a>&#8220;.  Make sure to turn on the speaker notes.  If you don&#8217;t feel like watching the slides, just try searching Google for <a href="http://www.google.ca/search?q=Mark+Bate+Statue">Mark Bate Statue</a> or <a href="http://www.google.ca/search?q=2323+Rosstown+Rd">2323 Rosstown Rd</a> and see if you can find the City of Nanaimo&#8217;s data in the results.  For technical information on the systems behind these results, see my previous posts on the <a href="http://www.jasonbirch.com/nodes/2009/07/16/302/nanaimo-public-art-with-seadragon-ajax-and-kml-awesomeness/">public art project</a> and the <a href="http://www.jasonbirch.com/nodes/2009/01/31/269/mapguide-rest-extension-feedback-wanted/">MapGuide GeoREST extension</a> the City is using to publish property information.</p>
<p>-J</p>
<p>P.S. This post was prompted by James&#8217; <a href="http://www.spatiallyadjusted.com/2009/08/03/a-hot-time-at-geoweb-2009/">mention</a> of the Moving Beyond the Desk slide show.  Thanks James!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2009/08/03/312/do-you-see-spiders-making-government-data-truly-open/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pretty tiles&#8230;</title>
		<link>http://www.jasonbirch.com/nodes/2009/06/17/299/pretty-tiles/</link>
		<comments>http://www.jasonbirch.com/nodes/2009/06/17/299/pretty-tiles/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 15:23:22 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[MapGuide]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OpenLayers]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=299</guid>
		<description><![CDATA[Zac Spitzer just tweeted: one of my projects just went live &#8211; http://www.exploreaustralia.net.au/ This is a pretty cool implementation. I believe that the maps on this site (e.g. Victoria) use OpenLayers, hitting an S3-hosted tile set generated by MapGuide Open Source, and show off some of MapGuide&#8217;s advanced renedering capabilities. -J]]></description>
			<content:encoded><![CDATA[<p>Zac Spitzer just <a href="http://twitter.com/zackster/status/2204495271">tweeted</a>: </p>
<blockquote><p>one of my projects just went live &#8211; <a href="http://www.exploreaustralia.net.au/">http://www.exploreaustralia.net.au/</a></p></blockquote>
<p>This is a pretty cool implementation.  I believe that the maps on this site (e.g. <a href="http://www.exploreaustralia.net.au/Victoria">Victoria</a>) use OpenLayers, hitting an S3-hosted tile set generated by MapGuide Open Source, and show off some of MapGuide&#8217;s advanced renedering capabilities.</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2009/06/17/299/pretty-tiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MapGuide 2.1 Beta 1</title>
		<link>http://www.jasonbirch.com/nodes/2009/05/26/291/mapguide-21-beta-1/</link>
		<comments>http://www.jasonbirch.com/nodes/2009/05/26/291/mapguide-21-beta-1/#comments</comments>
		<pubDate>Tue, 26 May 2009 17:07:32 +0000</pubDate>
		<dc:creator>Jason Birch</dc:creator>
				<category><![CDATA[MapGuide]]></category>
		<category><![CDATA[OSGeo]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.jasonbirch.com/nodes/?p=291</guid>
		<description><![CDATA[Late last night, Tom <a href="http://lists.osgeo.org/pipermail/mapguide-users/2009-May/018412.html">announced</a> the release of the first <a href="http://trac.osgeo.org/mapguide/wiki/Release/2.1">MapGuide 2.1</a> Beta.  

Jackie Ng has...]]></description>
			<content:encoded><![CDATA[<p>Late last night, Tom <a href="http://lists.osgeo.org/pipermail/mapguide-users/2009-May/018412.html">announced</a> the release of the first <a href="http://trac.osgeo.org/mapguide/wiki/Release/2.1">MapGuide 2.1</a> Beta.  </p>
<p>Jackie Ng has a <a href="http://themapguyde.blogspot.com/2009/05/mapguide-open-source-21-beta-released.html">better description</a> of this than I could write.</p>
<p>Apart from the improved scalability and stability of this release, I&#8217;m most excited about the <a href="http://wix.sourceforge.net/">WiX</a>-based open source MSI <a href="http://trac.osgeo.org/mapguide/browser/trunk/Installer">installer</a> that I got to work on alongside Jackie and Kenneth.  Huge learning curve, but not having to count on Autodesk resources to build new installers should allow us to push new releases as needed.  It also means that someone who understands the installer can easily create custom deployments for internal use.</p>
<p>Anyway, please give this beta a try.  If you notice anything it&#8217;s not doing right, please <a href="http://trac.osgeo.org/mapguide/wiki/SubmitTicket">let us know</a>.</p>
<p>-J</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonbirch.com/nodes/2009/05/26/291/mapguide-21-beta-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
