<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Misspelled nemesis club</title>
	<atom:link href="http://moreati.org.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://moreati.org.uk/blog</link>
	<description>A blog about life, technology &#38; databases</description>
	<pubDate>Fri, 27 Mar 2009 00:17:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Make a Windows installer for your python module</title>
		<link>http://moreati.org.uk/blog/2009/03/17/make-a-windows-installer-for-your-python-module/</link>
		<comments>http://moreati.org.uk/blog/2009/03/17/make-a-windows-installer-for-your-python-module/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 13:04:08 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

		<guid isPermaLink="false">http://moreati.org.uk/blog/?p=109</guid>
		<description><![CDATA[To help you build and distribute your Python packges, Python provides distutils. This library knows how to bring together your modules, where to put scripts and how to compile C extensions. The process is driven by a setup.py file, written by the package author or maintainer. Depending on what argument is passed, setup.py can install [...]]]></description>
			<content:encoded><![CDATA[<p>To help you build and distribute your Python packges, Python provides <a title="distutils introduction" href="http://docs.python.org/distutils/introduction.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.python.org');">distutils</a>. This library knows how to bring together your modules, where to put scripts and how to compile C extensions. The process is driven by a setup.py file, written by the package author or maintainer. Depending on what argument is passed, setup.py can install the package, build an archive or build an installer. To create a Windows installer for a module called wibble.py proceeed as follows.</p>
<p>Create a setup.py file in the same directory as your existing module(s), describing what is to be installed:</p>
<pre><span class="kn">from</span> <span class="nn">distutils.core</span> <span class="kn">import</span> <span class="n">setup</span>
<span class="n">setup</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">'Wibble'</span><span class="p">,</span>
      <span class="n">version</span><span class="o">=</span><span class="s">'1.0'</span><span class="p">,
</span>      <span class="n">description</span><span class="o">=</span><span class="s">'A utility to deal with underpants and pencils.'</span><span class="p">,</span>
      <span class="n">author</span><span class="o">=</span><span class="s">'Fred Bloggs'</span><span class="p">,</span>
      <span class="n">author_email</span><span class="o">=</span><span class="s">'fbloggs@example.org'</span><span class="p">,</span>
      <span class="n">py_modules</span><span class="o">=</span><span class="p">[</span><span class="s">'wibble'</span><span class="p">],</span> # Add more modules as desired
      <span class="p">)</span></pre>
<p>Run the following command:</p>
<pre>python setup.py bdist_wininst</pre>
<p>This will generate wibble-1.0.win32.exe, which can install Wibble on any Windows PC already having a version of Python. As a bonus the bdist_wininst command doesn&#8217;t itself require Windows, so you can create the installer on Linux or Mac OS.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2009/03/17/make-a-windows-installer-for-your-python-module/feed/</wfw:commentRss>
		</item>
		<item>
		<title>EuroPython 2009 open for registration</title>
		<link>http://moreati.org.uk/blog/2009/03/04/europython-2009-open-for-registration/</link>
		<comments>http://moreati.org.uk/blog/2009/03/04/europython-2009-open-for-registration/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 00:01:14 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[arcgis]]></category>

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

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

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

		<guid isPermaLink="false">http://moreati.org.uk/blog/?p=104</guid>
		<description><![CDATA[If you&#8217;ve enjoyed PyCon UK the last 2 years, the bad news is that it won&#8217;t be happening this year. The good news is that  EuroPython 2009 is coming to sunny Birmingham instead, for 3 days from Tues 30th June to Thurs 2nd July and registration is now open. The even better news is that [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve enjoyed <a href="http://pyconuk.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/pyconuk.org');">PyCon UK</a> the last 2 years, the bad news is that it won&#8217;t be happening this year. The good news is that  <a href="http://www.europython.eu/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.europython.eu');">EuroPython 2009</a> is coming to sunny Birmingham instead, for 3 days from Tues 30th June to Thurs 2nd July and <a href="http://www.europython.eu/registration/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.europython.eu');">registration is now open</a>. The even better news is that until 14th March it&#8217;s <em>really cheap</em>, like 50% off cheap making the 3 day conference only £95.</p>
<p>As a warm up, from Sunday we have 2 days of tutorials at the bargain price of £70. To close there will be sprints from Friday 3rd July, and in case any Django coders get home sick it all coincides with the <a href="http://www.birminghamjazzfestival.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.birminghamjazzfestival.com');">Birmingham International Jazz Festival</a>.</p>
<p>My talk on <a href="http://moreati.org.uk/blog/2009/01/27/from-esriarcgis-import-geodatabase/" >ArcGIS and IronPython</a> has been approved. So I&#8217;ll see you there.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2009/03/04/europython-2009-open-for-registration/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Shapefile 2.0 manifesto</title>
		<link>http://moreati.org.uk/blog/2009/03/01/shapefile-20-manifesto/</link>
		<comments>http://moreati.org.uk/blog/2009/03/01/shapefile-20-manifesto/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 13:13:44 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[arcgis]]></category>

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

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

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

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

		<guid isPermaLink="false">http://moreati.org.uk/blog/?p=54</guid>
		<description><![CDATA[Geographic Information Systems (GIS) are by their nature data driven. The data comes in a wide variety of  raster and vector formats. Rasters  hold raw, continuous data recorded striaght from the real world. An example is Satellite/aerial imagery, this is a commonly held in an open format with broad support, such as GeoTIFF [...]]]></description>
			<content:encoded><![CDATA[<p>Geographic Information Systems (GIS) are by their nature data driven. The data comes in a wide variety of  raster and vector formats. Rasters  hold raw, continuous data recorded striaght from the real world. An example is Satellite/aerial imagery, this is a commonly held in an open format with broad support, such as <a href="http://en.wikipedia.org/wiki/GeoTIFF" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">GeoTIFF</a> or <a href="http://en.wikipedia.org/wiki/JPEG" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">GeoJPEG</a>.</p>
<p><a href="http://en.wikipedia.org/wiki/GIS_file_formats#Vector_formats" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Vector formats</a> hold refined, discrete data, which has been manually traced or otherwise derived other data sources. Examples include  building outlines, contours, road routes, pipe networks land land parcels and locations. Vector data is usually traced or derived, at great expense from raster data, to encode business information - as a result it&#8217;s usually highly valuable.</p>
<p>Unfortunately, there are many GIS  vector file formats,  and most are proprietary. They can only be used to their full in their native software. Three of the biggest are AutoCAD <a href="http://en.wikipedia.org/wiki/AutoCAD_DXF" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">DXF</a>, MapInfo <a href="http://en.wikipedia.org/wiki/MapInfo_TAB_format" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">TAB</a> and ArcGIS <a href="http://en.wikipedia.org/w/index.php?title=Personal_Geodatabase" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Personal Geodatabase</a>. One vector format is unique -  both an open standard, and in wide use: Shapefile</p>
<p><a href="http://en.wikipedia.org/wiki/Shapefile" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Shapefile</a> is publicly documented  in <a href="http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.esri.com');">ESRI Shapefile Technical Description</a> by <a href="http://www.esri.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.esri.com');">ESRI Inc.</a>, it&#8217;s creator. Any GIS software worth it&#8217;s salt can read and write to the format, so it&#8217;s become the least common denominator. It is <em>the</em> format for storing and exchanging vector data between teams, departments, businesses and government. In my opinion this makes Shapefile the best thing ever to happen to GIS, without it the GIS market would be a fraction of it&#8217;s current size.<span id="more-54"></span></p>
<p>Despite it&#8217;s popularity, Shapefile does have some serious limitations, mainly due to it&#8217;s DBF heritage:</p>
<ul>
<li>A shapefile is limited to <span style="text-decoration: line-through;">2</span> 4 GB or <span style="text-decoration: line-through;">65535</span> 4 billion/len(record) records.<br />
Where len(record) is greater of either the average feature length in bytes, or the length of a DBF record.</li>
<li>Records are limited to <span style="text-decoration: line-through;">1000</span> 65536 bytes or <span style="text-decoration: line-through;">32</span> between 257 &amp; 2038 fields.</li>
<li>Field names are limited to <span style="text-decoration: line-through;">8</span> 10 characters, character fields can hold up to 254 bytes.</li>
<li>Unicode is <span style="text-decoration: line-through;">not supported</span> not widely supported.</li>
</ul>
<p>Currently the only real alternative, for data exchange, is <a href="http://en.wikipedia.org/wiki/Geography_Markup_Language" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Geography Markup Language (GML)</a> as defined by the <a href="http://www.opengeospatial.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opengeospatial.org');">Open Geospatial Consortium (OGC)</a>. An XML dialect, GML has none of the limitations of Shapefile this is why Ordnance Survey use GML to supply <a href="http://www.ordnancesurvey.co.uk/oswebsite/products/osmastermap/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ordnancesurvey.co.uk');">MasterMap</a>, a highly detailed vector map of Great Britain. Support for GML in software is growing, but  it&#8217;s unsuitable as a storage format.</p>
<p>Viewing and editing vector data requires support for random access by attribute and by spatial extent. As an XML dialect GML cannot do this, to find one record, the entire file must be parsed from beginning to end. GML is almost always converted to another format, or loaded into a spatial database before it is used.</p>
<p>A spatial database is a database with data types and functions able to handle geospatial data. For the major databases there is <a href="http://www.oracle.com/technology/products/spatial/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.oracle.com');">Oracle Spatial</a>, <a href="http://postgis.refractions.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/postgis.refractions.net');">PostgreSQL PostGIS</a>, <a href="http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.microsoft.com');">SQL Server Spatial</a>, <a href="http://dev.mysql.com/doc/refman/5.1/en/spatial-extensions.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/dev.mysql.com');">MySQL Spatial</a> and <a href="http://www-01.ibm.com/software/data/spatial/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www-01.ibm.com');">DB2 Spatial Extender</a>. All are based on <a href="http://en.wikipedia.org/wiki/Simple_Features" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Simple Features for SQL</a> an open standard, meaning spatial data can be queried and updated with SQL like any other data type.</p>
<p>I believe that a portable, standalone spatial database, would make a very good successor to Shapefile.  Such a format would drive the GIS market forward, increasing usage of GIS by making it easier to share edit, publish and share GIS data. A portable spatial database would negate the need for the import, view, edit, export cycle that GML imposes.</p>
<p>At the moment I see 3 contenders for the crown:</p>
<ol>
<li><a href="http://www.esri.com/software/arcgis/geodatabase/about/file-gdbs.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.esri.com');">File Geodatabase</a> is a format from ESRI, it is natively supported by ArcGIS. ESRI proclaim it &#8220;Allow[s] users to easily exchange geodatabases.&#8221; That is true only if both users are running ESRI&#8217;s ArcGIS software. File Geodatabase is a proprietary format, despite promises by ESRI when it was launched.</li>
<li><a href="http://fdo.osgeo.org/fdosdf/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/fdo.osgeo.org');">Spatial Data Format</a> (SDF) is a format from Autodesk, it is native support . Support is included as part of their Feature Data Objects library, released as Open Source. SDF is based on the popular SQLite embedded database engine.</li>
<li><a href="http://www.gaia-gis.it/spatialite/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.gaia-gis.it');">Spatialite</a> is another format based on SQLite, by an Alessandro Furieri. Spatialite is in it&#8217;s infancy still, it&#8217;s first release was 11 months ago.</li>
</ol>
<p>Unfortunately none of these looks like it will become a clear winner any time soon. Each is supported by only one application currently. If ESRI releases the specification for File Geodatabase, I expect it will quickly gain widespread support due to their position as market leader. As open source applications such as <a href="http://lists.osgeo.org/pipermail/qgis-developer/2009-January/005791.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/lists.osgeo.org');">QGIS  gain Spatialite support</a>, it could slowly achieve dominance in a grass roots fashion. SDF seems to be going nowhere.</p>
<p>So ESRI, please publish the details of File Geodatabase. At it&#8217;s launch, during the 2006 ESRI User Conference, you promised that File Geodatabase would be an interoperable format. You promised to release a software library, so we  could read and write them without ArcGIS. Neither has happened. So File Geodatabase is just another closed format, another pretender to the throne that&#8217;s achieved only 1% of it&#8217;s true potential.</p>
<p>Publish File Geodatabase, or we&#8217;ll take the Shapefile crown by force.</p>
<p>Update 27 Mar 2009: Corrected Shapefile limits, based on <a href="http://www.clicketyclick.dk/databases/xbase/format/dbf.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.clicketyclick.dk');">Xbase file structure</a> rather than <a href="http://www.clicketyclick.dk/databases/xbase/format/dbase_spec.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.clicketyclick.dk');">dBASE software specifications</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2009/03/01/shapefile-20-manifesto/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MXDPERFSTAT</title>
		<link>http://moreati.org.uk/blog/2009/02/14/mxdperfstat/</link>
		<comments>http://moreati.org.uk/blog/2009/02/14/mxdperfstat/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 13:25:28 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[arcgis]]></category>

		<guid isPermaLink="false">http://moreati.org.uk/blog/?p=85</guid>
		<description><![CDATA[Investigating the performance of an intranet mapping website this week, I was introduced MXDPERFSTAT. It&#8217;s a fantastic tool for investigating map display performance. Given an ArcMap document (a .mxd file) it runs ArcMap and loops over the map layers, displaying each at a list of  scales (e.g.  1:100000, 1:10000, 1:2500,  1:500) automatically. Scale cut-offs are [...]]]></description>
			<content:encoded><![CDATA[<p>Investigating the performance of an intranet mapping website this week, I was introduced <a href="http://arcscripts.esri.com/details.asp?dbid=15570" onclick="javascript:pageTracker._trackPageview('/outbound/article/arcscripts.esri.com');">MXDPERFSTAT</a>. It&#8217;s a fantastic tool for investigating map display performance. Given an ArcMap document (a .mxd file) it runs ArcMap and loops over the map layers, displaying each at a list of  scales (e.g.  1:100000, 1:10000, 1:2500,  1:500) automatically. Scale cut-offs are followed, in the same way ArcMap would.</p>
<p>Once done, MXDPERFSTAT writes an html report, of the time taken and features retrieved to display each layer at each scale. Since it runs in situ, network delays and other real world bottlenecks are accounted for. It even highlights layers that are abnormally slow, or that fetch an excessive number of features. Perfect for diagnosing a slow map, or guiding a tune up of the infrastructure.</p>
<p>Supporting ArcGIS installations, I&#8217;m a regular searcher on <a href="http://arcscripts.esri.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/arcscripts.esri.com');">ArcScripts</a>. How did I miss this for the last 4 years, and what other gems are there? What GIS utilities do you find indispensable?</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2009/02/14/mxdperfstat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Self decrypting emails considered harmful</title>
		<link>http://moreati.org.uk/blog/2009/02/09/self-decrypting-emails-considered-harmful/</link>
		<comments>http://moreati.org.uk/blog/2009/02/09/self-decrypting-emails-considered-harmful/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 00:36:20 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.moreati.org.uk/blog/?p=34</guid>
		<description><![CDATA[Sending a sensitive file, one that should be encrypted, amongst Linux and OSS geeks is doable. Most have heard of PGP, many have a GPG key (here is mine) and some even use it.
Sending an encrypted file to most people is a non-starter. The software may be there (Outlook is S/MIME capable), but the knowledge [...]]]></description>
			<content:encoded><![CDATA[<p>Sending a sensitive file, one that should be encrypted, amongst Linux and OSS geeks is doable. Most have heard of PGP, many have a GPG key (<a title="Public PGP key of Alex Willmer" href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x5A6F95BE" onclick="javascript:pageTracker._trackPageview('/outbound/article/pgp.mit.edu:11371');">here is mine</a>) and some even use it.</p>
<p>Sending an encrypted file to most people is a non-starter. The software may be there (Outlook is S/MIME capable), but the knowledge and the experience definately isn&#8217;t. Which is a shame, because I&#8217;d like to have my bank statement securely sent to my email account.</p>
<p><a href="http://www.pgp.com/products/desktop_home/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.pgp.com');">PGP Desktop</a> has a feature called the Self Decrypting Archive. To quote the <a href="http://www.pgp.com/products/commandline/servers/#faq17" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.pgp.com');">PGP Command Line for Servers FAQ</a>:</p>
<blockquote><p>A Self-Decrypting Archive (SDA) is an executable containing a file that has been encrypted using a passphrase. A recipient of an SDA runs the executable and enters the passphrase to decrypt the file.</p></blockquote>
<p>SDAs are an attempt to make encrypted email easier, by making decryption far easier for the recipient. However, Self Decrypting Archives are fundementally insecure. Here is how they&#8217;re meant to work:</p>
<ol>
<li>Alice runs PGP Desktop to encrypt a sensitive file, so she can send it to Bob.</li>
<li>Bob doesn&#8217;t have any encryption software, so PGP Desktop encrypts the sensitive file and appends it to a small decryptor program. The decryptor + sensitive file is the SDA.</li>
<li>Alice sends the SDA to Bob, attached to an email. Over the phone she tells him the encryption key.</li>
<li>Bob receives the email, and runs the SDA.</li>
<li>The SDA requests the decryption key, and decrypts file for Bob.</li>
</ol>
<p>That sounds great. Alice can encrypt files, send them securely to Bob, then he can decrypt them. Bob doesn&#8217;t need any encryption software installed.</p>
<p>Here&#8217;s the problem: Bob is running an unverified program. Supposedly it&#8217;s from Alice, but he can&#8217;t be sure. This is exactly how email viruses spread. Bob cannot trust the SDA, since he cannot be sure what he received was really sent by Alice.</p>
<p>Could Alice sign the SDA, including the decryptor program? Yes, but it won&#8217;t help.</p>
<p>All Bob has to verify Alice&#8217;s signature on the SDA, is the decryptor program in that same SDA. Here&#8217;s how Mallory, an attacker can subvert this:</p>
<ol>
<li>Alice sends the encrypted, signed SDA to Bob, and tells Bob the encryption key</li>
<li>Mallory  intercepts the email, replaces the decryptor program with his own. He sends the modified SDA on to Bob, spoofing the from address.</li>
<li>Bob receives the email, and runs Mallory&#8217;s SDA.</li>
<li>Mallory&#8217;s decryptor, running on Bob&#8217;s machine fakes a signature verification.</li>
<li>Mallory&#8217;s decryptor requests the encryption key and decrypts the file for Bob. It also sends the decrypted file back to Mallory, and installs a back door on Bob&#8217;s computer.</li>
</ol>
<p>The bottom line, is that you and I must be able to trust our encryption software, or the encryption is pointless. For that we must be able to verify we got it from a trustworthy source. Unsigned email, or email that verifies it&#8217;s own signature, cannot be trustworthy.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2009/02/09/self-decrypting-emails-considered-harmful/feed/</wfw:commentRss>
		</item>
		<item>
		<title>from ESRI.ArcGIS import Geodatabase</title>
		<link>http://moreati.org.uk/blog/2009/01/27/from-esriarcgis-import-geodatabase/</link>
		<comments>http://moreati.org.uk/blog/2009/01/27/from-esriarcgis-import-geodatabase/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 22:55:59 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[arcgis]]></category>

		<guid isPermaLink="false">http://moreati.org.uk/blog/?p=69</guid>
		<description><![CDATA[A couple of years ago I tried to use ArcObjects, through IronPython. It didn&#8217;t quite work.
Last week I tried again, using the newly released IronPython 2.0. This time it worked better.
create_sde_conn_file.py is based on CreateSDEConnFile.java, from Creating ArcSDE connection files on the fly using Python and ArcObjects on ESRI&#8217;s Geoprocessing blog.
For those not already familiar, [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of years ago <a href="http://lists.ironpython.com/pipermail/users-ironpython.com/2007-February/004588.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/lists.ironpython.com');">I tried to use ArcObjects, through IronPython</a>. It didn&#8217;t quite work.</p>
<p>Last week I tried again, using the newly released IronPython 2.0. This time it worked better.</p>
<p><a href="http://moreati.org.uk/blog/wp-content/uploads/2009/01/create_sde_conn_filepy.txt" >create_sde_conn_file.py</a> is based on CreateSDEConnFile.java, from <a href="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2008/09/24/Tips-and-Tricks-_2D00_-Creating-ArcSDE-connection-files-on-the-fly-using-Python-and-ArcObjects.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.esri.com');">Creating ArcSDE connection files on the fly using Python and ArcObjects</a> on ESRI&#8217;s Geoprocessing blog.</p>
<p>For those not already familiar, <a href="http://en.wikipedia.org/wiki/ArcGIS" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">ArcGIS</a> is by accounts the market leader for Geographic Information System (GIS) software. The core of the suite comprises ArcGIS Desktop, and ArcGIS Server.</p>
<p>On the desktop ArcMap is used to create map documents (.mxd file), whilst ArcCatalog is used to manage data sources. ArcGIS Server can (amongst other things) serve a map document, as a service for web client, Google Earth or remote ArcMap users.</p>
<p>ArcGIS may be automated to an extent, through an interface known as ArcGIS Geoprocessing. But this covers only some cases, delving deeper provides much greater opportunities.</p>
<p>ArcGIS is built on a COM object library named <a href="http://resources.esri.com/arcgisdesktop/index.cfm?fa=forDevelopers" onclick="javascript:pageTracker._trackPageview('/outbound/article/resources.esri.com');">ArcObjects</a>. Native ArcGIS files, such as an ArcSDE connection (.sde file) are the in memory COM object, serialised to disk as binary. It is difficult to edit or create such files in an automated fashion, without calling ArcObjects.</p>
<p>So, like the Java code CreateSDEConnFile.py calls ArcObjects directly. It can produce an ArcSDE connection file, suitable for ArcCatalog. It works by calling the .NET bindings, through Interop assemblies. Anything that can be done through VBA, or C# should be possible through IronPython.</p>
<p>There are a couple of rough edges. ArcObjects is verbose, and IronPython requires some boilerplate to deal with interfaces. Instead of writing</p>
<p><code>conn_props['SERVER'] = sys.argv[2]</code></p>
<p>or even</p>
<p><code>conn_props.SetProperty('SERVER', sys.argv[2])</code></p>
<p>one needs to write:</p>
<p><code>esriSystem.IPropertySet.SetProperty(conn_props, 'SERVER', sys.argv[2])</code></p>
<p>This is explained properly in IronPython bug <a href="http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=1506" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.codeplex.com');">1506</a> and <a href="http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=4538" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.codeplex.com');">4538</a>.</p>
<p>To run the script call it as:</p>
<p><code>"c:Program FilesIronPythonipy.exe" create_sde_conn_file.py<br />
filename.sde hostname 5151 username password SDE.DEFAULT ""<br />
</code></p>
<p>My intention is to take this proof of concept further. To do the same with layer files and map documents. Ultimately to create a build system, able to automatically generate a complete ArcMap document, from textual source files (e.g. json2mxd.py, mxd2xml.py).  This would allow proper version control of the source material, and automatic deployment of ArcGIS Server map services.</p>
<p>In the wider scheme, it should be possible to create custom GIS applications with Python, using the full capabilities ArcObjects and ArcGIS.</p>
<p>Updated 29 Jan 2009: Added some context, for those coming to this post from a Python background. Expanded goals.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2009/01/27/from-esriarcgis-import-geodatabase/feed/</wfw:commentRss>
		</item>
		<item>
		<title>meetyourmessenger.co.uk smells phishy</title>
		<link>http://moreati.org.uk/blog/2009/01/11/meetyourmessengercouk-smells-phishy/</link>
		<comments>http://moreati.org.uk/blog/2009/01/11/meetyourmessengercouk-smells-phishy/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 11:11:18 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://moreati.org.uk/blog/?p=65</guid>
		<description><![CDATA[Here&#8217;s an email I received today:
From:     meetYourmessenger &#60;no-reply@meetyourmessenger.com&#62;
Subject:     You have (1) new message from Adam
Hi alex,
You have (1) unread invitation &#8220;Hello :-)&#8221; from Adam at meetYourmessenger.co.uk
Click here
Show the message in your temporary inbox at meetYourmessenger.co.uk
I know an Adam on MSN Messenger, he didn&#8217;t send it. Mcafee SiteAdvisor says all is well,  the comments [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an email I received today:</p>
<blockquote><p>From:     meetYourmessenger &lt;no-reply@meetyourmessenger.com&gt;<br />
Subject:     You have (1) new message from Adam</p>
<p>Hi alex,</p>
<p>You have (1) unread invitation &#8220;Hello :-)&#8221; from Adam at meetYourmessenger.co.uk</p>
<p>Click here<br />
Show the message in your temporary inbox at meetYourmessenger.co.uk</p></blockquote>
<p>I know an Adam on MSN Messenger, he didn&#8217;t send it. Mcafee SiteAdvisor says <a href="http://www.siteadvisor.com/sites/meetyourmessenger.co.uk/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.siteadvisor.com');">all is well</a>,  the comments are less rosy. Until I see evidence otherwise, I&#8217;m treating meetyourmessenger as dodgy.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2009/01/11/meetyourmessengercouk-smells-phishy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Only one predication, Windows 7 will be released as Windows Vista SP 2.5</title>
		<link>http://moreati.org.uk/blog/2009/01/09/only-one-predication-windows-7-will-be-released-as-windows-vista-sp-25/</link>
		<comments>http://moreati.org.uk/blog/2009/01/09/only-one-predication-windows-7-will-be-released-as-windows-vista-sp-25/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 00:20:50 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://moreati.org.uk/blog/?p=63</guid>
		<description><![CDATA[I have no evidence, and it&#8217;s wishful thinking more than anything. However, I predict that just before the expected release Microsoft will reveal Windows 7 is to be a free upgrade for Windows Vista users.
P.S. If you have any trouble posting a comment to this blog, please let me know on alex@moreati.org.uk.
]]></description>
			<content:encoded><![CDATA[<p>I have no evidence, and it&#8217;s wishful thinking more than anything. However, I predict that just before the expected release Microsoft will reveal Windows 7 is to be a free upgrade for Windows Vista users.</p>
<p>P.S. If you have any trouble posting a comment to this blog, please let me know on <a href="mailto:alex@moreati.org.uk">alex@moreati.org.uk</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2009/01/09/only-one-predication-windows-7-will-be-released-as-windows-vista-sp-25/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Timesheets in OpenOffice Calc and Excel</title>
		<link>http://moreati.org.uk/blog/2008/11/27/timesheets-in-openoffice-calc-and-excel/</link>
		<comments>http://moreati.org.uk/blog/2008/11/27/timesheets-in-openoffice-calc-and-excel/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 23:45:14 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://moreati.org.uk/blog/?p=62</guid>
		<description><![CDATA[Putting my timesheets in order today, I finally figured out how to make Excel deal correctly with time durations. The default is to treat values as a date/time, formatted as hh:mm. So a value such as 37:00 - meant as a duration - is displayed as 13:00 (1 PM the following day). To correct this, [...]]]></description>
			<content:encoded><![CDATA[<p>Putting my timesheets in order today, I finally figured out how to make Excel deal correctly with time durations. The default is to treat values as a date/time, formatted as hh:mm. So a value such as 37:00 - meant as a duration - is displayed as 13:00 (1 PM the following day). To correct this, choose custom cell formatting, and enter the format as [h]:mm.</p>
<p>In OpenOffice Calc, [H]:MM is the default format for a time value (tested with 3.0), so durations work out of the box. For something pre-cooked, the <a href="http://documentation.openoffice.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/documentation.openoffice.org');">OpenOffice Documentation</a> site has a <a href="http://documentation.openoffice.org/Samples_Templates/User/template/Timesheet.stc" onclick="javascript:pageTracker._trackPageview('/outbound/article/documentation.openoffice.org');">timesheet template by Vivian Lal</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2008/11/27/timesheets-in-openoffice-calc-and-excel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Deep Zoom and others for displaying large images on the web</title>
		<link>http://moreati.org.uk/blog/2008/11/26/deep-zoom-and-others-for-displaying-large-images-on-the-web/</link>
		<comments>http://moreati.org.uk/blog/2008/11/26/deep-zoom-and-others-for-displaying-large-images-on-the-web/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 23:42:26 +0000</pubDate>
		<dc:creator>Alex Willmer</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.moreati.org.uk/blog/?p=24</guid>
		<description><![CDATA[Slashgeo have noted the release of Deep Zoom in Javascript aka Seadragon, by Microsoft. Deep Zoom allows one to deliver a very high resolution image over the web, with pan and zoom. Only the portions viewed are download, so bandwidth usage is minimised. Until now Deep Zoom was Silverlight only.
It works similarly to OpenStreetMap, Google [...]]]></description>
			<content:encoded><![CDATA[<p>Slashgeo have noted the release of <a href="http://technology.slashgeo.org/technology/08/11/26/1717243.shtml" onclick="javascript:pageTracker._trackPageview('/outbound/article/technology.slashgeo.org');">Deep Zoom in Javascript</a> aka <a href="http://livelabs.com/seadragon/" onclick="javascript:pageTracker._trackPageview('/outbound/article/livelabs.com');">Seadragon</a>, by Microsoft. <a href="http://msdn.microsoft.com/en-us/library/cc645050(VS.95).aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/msdn.microsoft.com');">Deep Zoom</a> allows one to deliver a very high resolution image over the web, with pan and zoom. Only the portions viewed are download, so bandwidth usage is minimised. Until now Deep Zoom was Silverlight only.</p>
<p>It works similarly to OpenStreetMap, Google Maps or Live Search Maps. A large image is transformed into a &#8216;pyramid&#8217;, by generating lower resolution versions (e.g. full, ½, ¼, ⅛ &#8230;) and stacking them until a peak is reached. Each level is cut into square tiles, which are stored individually in a known hierarchy. The pyramid generation is similar to <a href="http://en.wikipedia.org/wiki/Mip_map" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">mip-mapping</a>.</p>
<p>The image might be satellite or aerial photography, a scanned map, a legal document, medical imagery (e.g. a smear test or x-ray) or any highly detailed photograph. Deep Zoom joins a collection of platforms and technologies that perform a similar role, which I&#8217;ll briefly summarise.<span id="more-24"></span></p>
<h2>IIPImage</h2>
<p><a href="http://iipimage.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/iipimage.sourceforge.net');">IIPImage</a><a href="http://iipimage.sourceforge.net/documentation/protocol/" onclick="javascript:pageTracker._trackPageview('/outbound/article/iipimage.sourceforge.net');"></a> is an Open Source package that has a similar design to Deep Zoom, it&#8217;s named after the <a href="http://iipimage.sourceforge.net/documentation/protocol/" onclick="javascript:pageTracker._trackPageview('/outbound/article/iipimage.sourceforge.net');">Internet Image Protocol</a>. The tiles are extracted as needed from a specially constructed tiff file. On the server a FastCGI module extracts the tiles as needed. <a href="http://iipimage.sourceforge.net/documentation/clients/" onclick="javascript:pageTracker._trackPageview('/outbound/article/iipimage.sourceforge.net');">Clients</a> written in Java (<a href="http://merovingio.c2rmf.cnrs.fr/iipimage/IIPJavaDemo-Galaxy.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/merovingio.c2rmf.cnrs.fr');">demo</a>), Flash (<a href="http://merovingio.c2rmf.cnrs.fr/iipimage/IIPFlashDemo.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/merovingio.c2rmf.cnrs.fr');">demo</a>) and AJAX (<a href="http://merovingio.c2rmf.cnrs.fr/iipimage/iipmooviewer-1.1/nebula.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/merovingio.c2rmf.cnrs.fr');">demo</a>) clients are available.</p>
<h2>Lizardtech GeoExpress/MrSID</h2>
<p><a href="http://www.lizardtech.com/download/dl_download.php?detail=geo_expressview_plugin&amp;platform=win" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.lizardtech.com');">Lizardtech ExpressView</a> is a browser plugin to view files in the proprietary  <a href="http://en.wikipedia.org/wiki/MrSID" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">MrSID</a> image format. MrSID files can achieve higher compression ratios than JPEG for a given image quality, particularly for aerial imagery. ExpressView is Windows only, but is also able to render a MrSID file from a local disk or an email attachment. Encoding can be done with GeoExpress, or GDAL or other applications that embed the SDK.</p>
<h2>OpenLayers</h2>
<p><a href="http://openlayers.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/openlayers.org');">OpenLayers</a> is a JavaScript library used for embedding a map (e.g. <a href="http://openstreetmap.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/openstreetmap.org');">OpenStreetMap</a>) within the browser. OpenLayers is not restricted to maps, it can be used with <a href="http://tilecache.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/tilecache.org');">TileCache</a>, to <a href="http://tilecache.org/demos/mario.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/tilecache.org');">view any bitmap</a>.</p>
<h2>Zoomify</h2>
<p><a href="http://www.zoomify.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.zoomify.com');">Zoomify</a> is a long term player in this field, offering Zoomify EZ, Zoomify Flash and Zoomify Enterprise. The Flash client is free to use in it&#8217;s most basic form, or additional features are available for a fee.</p>
<h2>Other image formats</h2>
<p><a href="http://www.jpeg.org/jpeg2000/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.jpeg.org');">JPEG 2000</a> is a open format similar in design to MrSID, but it has gained little traction on the desktop. <a href="http://en.wikipedia.org/wiki/HD_Photo" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">HD Photo</a> (aka JPEG XR, fka Windows Media Photo) is a fledgling format with similar capabilities to JPEG 2000 or MrSID, but cheaper encoding routines that make it faster to compress. <a href="http://www.ermapper.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ermapper.com');">ER Mapper</a> ECW is again similar to MrSID and JPEG 2000, a Windows only <a href="http://www.ermapper.com/ProductView.aspx?t=160" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ermapper.com');">ER Viewer</a> is available.</p>
<p>If you know of other formats, technologies or techniques, or if you&#8217;d like to know more, please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://moreati.org.uk/blog/2008/11/26/deep-zoom-and-others-for-displaying-large-images-on-the-web/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
