<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" version="2.0">

<channel>
	<title>Jonah M. Duckles</title>
	
	<link>http://jduck.net</link>
	<description />
	<pubDate>Tue, 11 Nov 2008 15:51:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-beta2-9681</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<geo:lat>42.037108</geo:lat><geo:long>-88.107199</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/jducknet" type="application/rss+xml" /><item>
		<title />
		<link>http://jduck.net/2008/11/11/138/</link>
		<comments>http://jduck.net/2008/11/11/138/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 15:51:13 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jduck.net/?p=138</guid>
		<description>Interesting ad campaign at NYTimes for apple.  John Hodgeman walks off the vertical ad space and into the horizontal banner.  Interesting use of two separate ad spaces to fuse them as one.  Cool.</description>
			<content:encoded><![CDATA[<p>Interesting ad campaign at NYTimes for apple.  John Hodgeman walks off the vertical ad space and into the horizontal banner.  Interesting use of two separate ad spaces to fuse them as one.  Cool.</p>
<p><a href="http://jduck.net/blog/blog/wp-content/uploads/2008/11/nytimesapplecampaign.png"><img src="http://jduck.net/blog/blog/wp-content/uploads/2008/11/nytimesapplecampaign-300x159.png" alt="nytimesapplecampaign" title="nytimesapplecampaign" width="300" height="159" class="alignnone size-medium wp-image-139" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2008/11/11/138/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Image mosaic of Barack Obama’s newspaper frontpages</title>
		<link>http://jduck.net/2008/11/10/image-mosaic-of-barack-obamas-newspaper-frontpages/</link>
		<comments>http://jduck.net/2008/11/10/image-mosaic-of-barack-obamas-newspaper-frontpages/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 02:28:37 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jduck.net/?p=134</guid>
		<description>When I saw this, my first instinct was to try making a photomosaic of the images.
This is what I got&amp;#8230;pretty cool (click the image for a high res version 6MB):</description>
			<content:encoded><![CDATA[<p>When I saw <a href="http://obama2008.s3.amazonaws.com/headlines.html">this</a>, my first instinct was to try making a photomosaic of the images.</p>
<p>This is what I got&#8230;pretty cool (click the image for a high res version 6MB):<br />
<div class="wp-caption alignnone" style="width: 490px"><a href="http://jduck.net/blog/images/obama.jpg"><img alt="Photo Mosaic from newspaper images of Barack Obama" src="http://jduck.net/blog/images/t_obama.jpg" title="Barack Obama Photo Mosaic" width="480" height="602" /></a><p class="wp-caption-text">Photo Mosaic from newspaper images of Barack Obama</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2008/11/10/image-mosaic-of-barack-obamas-newspaper-frontpages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using OGR to convert GIS Vector formats</title>
		<link>http://jduck.net/2008/07/18/using-ogr-to-convert-gis-vector-formats/</link>
		<comments>http://jduck.net/2008/07/18/using-ogr-to-convert-gis-vector-formats/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 21:34:36 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[geospatial]]></category>

		<category><![CDATA[gis]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[oss]]></category>

		<guid isPermaLink="false">http://jduck.net/2008/07/18/using-ogr-to-convert-gis-vector-formats/</guid>
		<description>OGR is a part of GDAL and is very useful for converting between geospatial vector formats.  What does that mean?  When storing Vector GIS data there are a dizzying number of formats it can be stored in, some of the more popular of late, or at least well known are KML and SHP. [...]</description>
			<content:encoded><![CDATA[<p><a href="http://www.gdal.org/ogr/">OGR</a> is a part of <a href="http://www.gdal.org/">GDAL</a> and is very useful for converting between geospatial <a href="http://www.gdal.org/ogr/ogr_formats.html">vector formats</a>.  What does that mean?  When storing Vector GIS data there are a dizzying number of formats it can be stored in, some of the more popular of late, or at least well known are KML and SHP.  A friend of a friend was looking to convert some SHP (Shapefiles) into KML so that he could make a Google Maps mashup and I helped him out.  Here is a workflow for how I went about performing the conversion.</p>
<p>OGR can be installed on debian/ubuntu machines by installing the package gdal-bin:</p>
<pre>sudo apt-get install gdal-bin</pre>
<p>Once you have GDAL/OGR installed you get a slew of command line utilities, I&#8217;ll try to cover some others in later tutorials, but for now we&#8217;re interested in ogr2ogr.  ogr2ogr converts between the vector formats that OGR understands.</p>
<p>Example using a shapefile at the city of chicago website:<br />
Download the data</p>
<pre>wget http://egov.cityofchicago.org/webportal/COCWebPortal/COC_ATTACH/TIFS2008.zip</pre>
<p>Unzip it</p>
<pre>unzip TIFS2008.zip</pre>
<p>Now we have to do the hard part (not really that hard, but important), look for the projection information in the metadata.  I looked in the tifs.shp.xml file and found that the projections is:</p>
<pre>NAD_1983_StatePlane_Illinois_East_FIPS_1201_Feet</pre>
<p>Google uses WGS84 spatial reference system.<br />
Now we have to lookup EPSG codes that OGR understands for these projections.  A good spot to do this is <a href="http://spatialreference.org">spatialreference.org</a>.  EPSG codes provide a short form of expressing projection and spatial reference information.<br />
Once we have that all sorted out we&#8217;re ready to run ogr2ogr:</p>
<pre>ogr2ogr -f "KML" -s_srs "EPSG:102671" -t_srs "EPSG:4326" tifs.kml tifs.shp</pre>
<p>The -f &#8220;KML&#8221; specifies that we want the output in KML.  -s_srs is the source (tifs.shp) spatial reference system and -t_srs is the target spatial reference system found at spatialreference.org, then we specify the output file tifs.kml and the input file tifs.shp.  That is it!</p>
<p>Lets shrink it down into a kmz (compressed kml) so that it takes up less disk space.</p>
<pre>zip tifs.kmz tifs.kml</pre>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2008/07/18/using-ogr-to-convert-gis-vector-formats/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Antrhopogenic RF Interference</title>
		<link>http://jduck.net/2008/03/12/antrhopogenic-rf-interference/</link>
		<comments>http://jduck.net/2008/03/12/antrhopogenic-rf-interference/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 14:52:50 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[remote sensing]]></category>

		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://jduck.net/2008/03/12/antrhopogenic-rf-interference/</guid>
		<description>Was looking at raw AMSR-E data (a passive microwave radiometer flying on board Aqua).  Can you tell where the cities are?

Hmmm&amp;#8230;I wonder what one can do with this?  A development indicator, surrogate for population?  Very interesting.  This anthropogenic interference gets in the way of soil moisture detection over land, but I [...]</description>
			<content:encoded><![CDATA[<p>Was looking at raw <a href="http://sharaku.eorc.jaxa.jp/AMSR/index_e.htm">AMSR-E</a> data (a passive microwave radiometer flying on board <a href="http://aqua.nasa.gov/">Aqua)</a>.  Can you tell where the cities are?</p>
<p><a href='http://jduck.net/blog/blog/wp-content/uploads/2008/03/pmtbeqn29d016y080308v06sa.png' title='pmtbeqn29d016y080308v06sa.png'><img src='http://jduck.net/blog/blog/wp-content/uploads/2008/03/pmtbeqn29d016y080308v06sa.thumbnail.png' alt='pmtbeqn29d016y080308v06sa.png' /></a></p>
<p>Hmmm&#8230;I wonder what one can do with this?  A development indicator, surrogate for population?  Very interesting.  This anthropogenic interference gets in the way of soil moisture detection over land, but I wonder if it can be used creatively for something else.</p>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2008/03/12/antrhopogenic-rf-interference/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Small houses</title>
		<link>http://jduck.net/2008/01/08/small-houses/</link>
		<comments>http://jduck.net/2008/01/08/small-houses/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 14:49:32 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[building]]></category>

		<category><![CDATA[environment]]></category>

		<category><![CDATA[green]]></category>

		<guid isPermaLink="false">http://jduck.net/2008/01/08/small-houses/</guid>
		<description>I have a dream of having one of these buildings (slideshow at Wired.com) in my back yard as a home office someday.  Another dream is to get an acreage and scatter several of these buildings around with some paths connecting them together.</description>
			<content:encoded><![CDATA[<p>I have a dream of having one of <a href="http://www.wired.com/science/discoveries/multimedia/2008/01/modular_homes?slide=1&#038;slideView=3">these buildings (slideshow at Wired.com)</a> in my back yard as a home office someday.  Another dream is to get an acreage and scatter several of these buildings around with some paths connecting them together.</p>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2008/01/08/small-houses/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 Dangerous things you should let your kids do.</title>
		<link>http://jduck.net/2008/01/08/5-dangerous-things-you-should-let-your-kids-do/</link>
		<comments>http://jduck.net/2008/01/08/5-dangerous-things-you-should-let-your-kids-do/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 14:43:55 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[kids]]></category>

		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://jduck.net/2008/01/08/5-dangerous-things-you-should-let-your-kids-do/</guid>
		<description>Gever Tulley has a great video about the sort of dangerous things kids need to do when growing up.  It is nice to see this kind of thing.  Its a breath of fresh air from the fear society we live in.  On a related note, kids don&amp;#8217;t get the freedom to go [...]</description>
			<content:encoded><![CDATA[<p>Gever Tulley has a <a href="http://www.ted.com/index.php/talks/view/id/202">great video</a> about the sort of dangerous things kids need to do when growing up.  It is nice to see this kind of thing.  Its a breath of fresh air from the fear society we live in.  On a related note, kids don&#8217;t get the freedom to <a href="http://www.dailymail.co.uk/pages/live/articles/news/news.html?in_article_id=462091&#038;in_page_id=1770">go out walking and exploring</a> much anymore.</p>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2008/01/08/5-dangerous-things-you-should-let-your-kids-do/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scanning with sane’s scanimage from an ADF scanner to PDF and OCRed Text</title>
		<link>http://jduck.net/2008/01/05/ocr-scanning/</link>
		<comments>http://jduck.net/2008/01/05/ocr-scanning/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 17:34:21 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[hacks]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[scanning]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jduck.net/2008/01/05/ocr-scanning/</guid>
		<description>Using libsane and tesseract, you can scan from an ADF (or non ADF) scanner in Ubuntu 7.10 to a PDF and OCR&amp;#8217;ed text document with a few easy steps.
First we need to make sure we have the necessary packages installed.

apt-get install tesseract-ocr sane-utils


The tesseract-ocr package gives us a utility called tesseract which takes a TIFF [...]</description>
			<content:encoded><![CDATA[<p>Using libsane and tesseract, you can scan from an ADF (or non ADF) scanner in Ubuntu 7.10 to a PDF and OCR&#8217;ed text document with a few easy steps.</p>
<p>First we need to make sure we have the necessary packages installed.</p>
<pre>
apt-get install tesseract-ocr sane-utils
</pre>
<p><span id="more-110"></span></p>
<p>The tesseract-ocr package gives us a utility called tesseract which takes a TIFF file as input and will output the OCR&#8217;d .txt file of the tiff.</p>
<pre>
tesseract my.tif output
</pre>
<p>Now we need a command line method to grab the TIFF, sane-utils comes to the rescue.  The command &#8220;scanimage&#8221; from sane will let us do that.  It is a great little utility that I recommend reading up on to learn more about its features and options, as they may vary based on the type of scanner you have.  My scanner has an Auto Document Feeder (ADF) so be aware that my instructions are specific to an ADF scanner.</p>
<p>This example is for scanning a letter sized piece of paper in batch mode saving output in the format of a TIFF</p>
<pre>
scanimage -y 279.4 -x 215.9 --batch --format=tiff --mode Lineart --resolution 300 --source ADF
</pre>
<p>This will output a new TIFF for each page that is scanned.</p>
<p>The below script combines several steps to output a single PDF document and .txt file for a scan job.</p>
<pre>
#!/bin/bash
outname=$1
startdir=$(pwd)
tmpdir=scan-$RANDOM

cd /tmp
mkdir $tmpdir
cd $tmpdir
echo "################## Scanning ###################"
scanimage -y 279.4 -x 215.9 --batch --format=tiff --mode Lineart --resolution 300 --source ADF
echo "################### OCRing ####################"
i=1
for page in $(ls *.tif); do
        echo -n "Page: $i - "
        #run tesseract on each page and combine the outputs in a single file with a .txt extension.
        tesseract $page $page
        echo "---BEGIN PAGE: $i ---" >> $outname.txt
        cat $page.txt >> $outname.txt
        echo "---END PAGE: $1 ---" >> $outname.txt
        i=$(expr $i + 1)
done
mv $outname.txt $startdir
echo "############## Converting to PDF ##############"
#Use tiffcp to combine output tiffs to a single mult-page tiff
tiffcp -c lzw out*.tif output.tif
#Convert the tiff to PDF
tiff2pdf output.tif > $startdir/$outname
cd ..
echo "################ Cleaning Up ################"
rm -rf $tmpdir
cd $startdir
</pre>
<p>I name the above script &#8220;scandoc&#8221; and it can be run by typing &#8220;scandoc myoutput.pdf&#8221; which will drop a pdf file (called myoutput.pdf) and a .txt (called myoutput.pdf.txt) file in the current directory with all the pages from the ADF.  Very handy!</p>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2008/01/05/ocr-scanning/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ntfsundelete</title>
		<link>http://jduck.net/2007/12/20/ntfsundelete/</link>
		<comments>http://jduck.net/2007/12/20/ntfsundelete/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 20:06:54 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://jduck.net/2007/12/20/ntfsundelete/</guid>
		<description>Just did a stupid thing and deleted a whole tree of file on a windows partition.  Never fear&amp;#8230;ntfsundelete is here.

sudo ntfsundelete -u -d /destination/directory -f -m *.jpg /dev/sda1

Run without the -u option and -d options to show what can be recovered.
On ubuntu/debian to install it do:

apt-get install ntfsprogs</description>
			<content:encoded><![CDATA[<p>Just did a stupid thing and deleted a whole tree of file on a windows partition.  Never fear&#8230;ntfsundelete is here.</p>
<pre>
sudo ntfsundelete -u -d /destination/directory -f -m *.jpg /dev/sda1
</pre>
<p>Run without the -u option and -d options to show what can be recovered.</p>
<p>On ubuntu/debian to install it do:</p>
<pre>
apt-get install ntfsprogs
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2007/12/20/ntfsundelete/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Getting to know PostGIS</title>
		<link>http://jduck.net/2007/11/06/getting-to-know-postgis/</link>
		<comments>http://jduck.net/2007/11/06/getting-to-know-postgis/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 14:45:13 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[database]]></category>

		<category><![CDATA[geospatial]]></category>

		<category><![CDATA[gis]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://jduck.net/2007/11/06/getting-to-know-postgis/</guid>
		<description>I am making the plunge to get more informed with how to use PostGIS.  It is pretty impressive so far.  Here is a quick tutorial which shows you how to get started and loading in a shapefile to play around with some fun SQL querying.  I assume a basic understanding of the [...]</description>
			<content:encoded><![CDATA[<p>I am making the plunge to get more informed with how to use PostGIS.  It is pretty impressive so far.  Here is a quick tutorial which shows you how to get started and loading in a shapefile to play around with some fun SQL querying.  I assume a basic understanding of the linux command line and some basic SQL skills. </p>
<p>To get started in ubuntu 7.04 (should work in 7.10 and debian too):</p>
<pre><code>$ sudo apt-get install postgis postgresql-8.1-postgis</code></pre>
<p>Next we&#8217;ll start setting up the PostGIS environment.<br />
<span id="more-104"></span></p>
<p>Then we need to set up a new database, I called mine geodb:</p>
<pre><code>$ createdb geodb</code></pre>
<p>We then need to bind it to the PostGIS libs with the following:</p>
<pre><code>$ createlang plpgsql geodb</code></pre>
<p>And finally add the PostGIS Tables:</p>
<pre><code>$ psql -d mytestdb -f /usr/share/postgresql-8.1-postgis/lwpostgis.sql
$ psql -d mytestdb -f /usr/share/postgresql-8.1-postgis/spatial_ref_sys.sql</code></pre>
<p>Phew&#8230;.that was a bit of work.</p>
<p>Now we&#8217;re ready to go.  We have a database called geodb and we&#8217;ve told PostgreSQL that it is a PostGIS database.</p>
<p>So now we can use the shp2pgsql command to import a shapefile into the db:</p>
<pre><code>$ shp2pgsql -W LATIN1 -D -I myshapefile.shp mytablename | psql geodb</code></pre>
<p>-W is for setting the encoding type, I had problems with many shapefiles as my locale is UTF8 and PostgreSQL seems to default to the locale.  For me LATIN1 has been working better.</p>
<p>-D sets the SQL output to be in dump format for insertion into the database.</p>
<p>-I flags it to compute the spatial indexing upon import.  For large complex vector features this can take awhile, so use with discretion.</p>
<p>All of this is piped to </p>
<p>This gives us a new table called &#8220;tablename&#8221;, which we can see by doing the following:</p>
<pre><code>$ psql geodb
Welcome to psql 8.1.8, the PostgreSQL interactive terminal.

Type:  \\copyright for distribution terms
       \\h for help with SQL commands
       \\? for help with psql commands
       \\g or terminate with semicolon to execute query
       \\q to quit

geodb=# </code></pre>
<p>At the PostgreSQL prompt you can enter various SQL commands including queries.  </p>
<pre><code>geodb=# \\d mytablename</code></pre>
<p>shows the columns and data types of the data in the table.</p>
<p>Notice the column called: the_geom</p>
<p>This is where the <a href="http://postgis.refractions.net/docs/ch04.html#RefObject">GIS Objects</a> are stored.</p>
<p>The sample query there would show all the data in the shapefile&#8217;s associated .dbf as well as a column called </p>
<p>Next time we&#8217;ll launch into some querying fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2007/11/06/getting-to-know-postgis/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A bundle of links…</title>
		<link>http://jduck.net/2007/11/06/a-bundle-of-links/</link>
		<comments>http://jduck.net/2007/11/06/a-bundle-of-links/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 14:44:20 +0000</pubDate>
		<dc:creator>Jonah</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://jduck.net/2007/11/06/a-bundle-of-links/</guid>
		<description>Some neat things found on the web recently:
Ponoko - Custom Laser cutting of Plexiglas and plywood.
Make your circuit boards in china for cheap
CouchDB simple database for content management systems.
Mabel&amp;#8217;s Labels - Got kids?  Need to label their stuff, these look neat.</description>
			<content:encoded><![CDATA[<p>Some neat things found on the web recently:</p>
<li><a href="http://ponoko.com">Ponoko</a> - Custom Laser cutting of Plexiglas and plywood.</li>
<li>Make your <a href="http://www.nearfuturelaboratory.com/?p=337">circuit boards in china</a> for cheap</li>
<li><a href="http://couchdb.org">CouchDB</a> simple database for content management systems.</li>
<li><a href="http://www.mabel.ca/mabel.php">Mabel&#8217;s Labels</a> - Got kids?  Need to label their stuff, these look neat.</li>
]]></content:encoded>
			<wfw:commentRss>http://jduck.net/2007/11/06/a-bundle-of-links/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
