<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Andrew Harvey&#039;s Blog &#187; osm</title>
	<atom:link href="http://andrewharvey4.wordpress.com/tag/osm/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewharvey4.wordpress.com</link>
	<description>Software Developer, Mapper, Free Culture/Software Supporter, Recreational Cyclist</description>
	<lastBuildDate>Mon, 01 Apr 2013 13:56:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='andrewharvey4.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Andrew Harvey&#039;s Blog &#187; osm</title>
		<link>http://andrewharvey4.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://andrewharvey4.wordpress.com/osd.xml" title="Andrew Harvey&#039;s Blog" />
	<atom:link rel='hub' href='http://andrewharvey4.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A free and open source SRTM shaded relief and contour map</title>
		<link>http://andrewharvey4.wordpress.com/2012/10/09/a-free-and-open-source-srtm-shaded-relief-and-contour-map/</link>
		<comments>http://andrewharvey4.wordpress.com/2012/10/09/a-free-and-open-source-srtm-shaded-relief-and-contour-map/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 11:50:21 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1438</guid>
		<description><![CDATA[I&#8217;ve recently pushed out a new srtm3-stylesheets repository which contains shell scripts for working with NASA SRTM DEM data, gdaldem based stylesheets for shaded relief maps, Mapnik stylesheets for contours and a TileStache configuration for sandwich those styles together into a single map. This was spurred on by the fact that I simply needed a [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1438&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve recently pushed out a new <a href="https://github.com/andrewharvey/srtm3-stylesheets">srtm3-stylesheets repository</a> which contains shell scripts for working with NASA SRTM DEM data, gdaldem based stylesheets for shaded relief maps, Mapnik stylesheets for contours and a TileStache configuration for sandwich those styles together into a single map.</p>
<p>This was spurred on by the fact that I simply needed a map which showed hills. I&#8217;ve used Andy Allan&#8217;s OpenCycleMap in the past which has color relief and contours. Unfortunately it is closed source.</p>
<p>So I put my head down and hacked together repeatable scripts to get the source data up and running and some basic stylesheets to produce a usable and pleasant looking map. All released as free and open source software under the CC0 license.</p>
<p><a href="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-3.png"><img class="aligncenter size-full wp-image-1439" title="srtm3-3" src="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-3.png?w=595&#038;h=343" alt="Contour Map" width="595" height="343" /></a></p>
<p>I want to avoid adding things like streets etc, such maps could be built as separated layers based upon this style and sandwiched together, for example, with the TileStache sandwich provider.</p>
<p>I hope to build upon the lessons learnt here to produce a map like the Stamen Terrain map, except with the source code released under a free and open source license. Perhaps just with hill and slope shading applied to landuse with other map features placed on top.</p>
<p><a href="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-1.png"><img class="aligncenter size-full wp-image-1440" title="srtm3-1" src="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-1.png?w=595&#038;h=402" alt="Contour Map" width="595" height="402" /></a></p>
<p><a href="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-2.png"><img class="aligncenter size-full wp-image-1441" title="srtm3-2" src="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-2.png?w=595&#038;h=347" alt="Contour Map" width="595" height="347" /></a></p>
<p>I&#8217;ve rendered NSW (only server resource prevent worldwide!) as a <a href="http://tianjara.net/map#srtm3/9/-33.8043/150.8134">slippy map here</a>.</p>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/dev/'>dev</a>, <a href='http://andrewharvey4.wordpress.com/tag/geo/'>geo</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1438/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1438&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2012/10/09/a-free-and-open-source-srtm-shaded-relief-and-contour-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-3.png" medium="image">
			<media:title type="html">srtm3-3</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-1.png" medium="image">
			<media:title type="html">srtm3-1</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2012/10/srtm3-2.png" medium="image">
			<media:title type="html">srtm3-2</media:title>
		</media:content>
	</item>
		<item>
		<title>Development Update (Static OSM Tiles, git rebase, Map Labelling)</title>
		<link>http://andrewharvey4.wordpress.com/2011/12/11/development-update-static-osm-tiles-git-rebase-map-labelling/</link>
		<comments>http://andrewharvey4.wordpress.com/2011/12/11/development-update-static-osm-tiles-git-rebase-map-labelling/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 00:12:22 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1353</guid>
		<description><![CDATA[Map Labelling Suburbs and Cities Yesterday I pushed a bunch of changes to my OSM/Aerial Imagery Hybrid Style, see the (demo). I spent a bit of time on suburb and city labels as they are a really important feature of a map aimed at non-experts. I&#8217;m finding making a non-trivial style like this has defiantly [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1353&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2>Map Labelling Suburbs and Cities</h2>
<p>Yesterday I pushed a bunch of changes to my <a href="https://github.com/andrewharvey/osm-hybrid-carto/">OSM/Aerial Imagery Hybrid Style</a>, see the <a href="http://tianjara.net/leaflet.html#map=agri,osmt;lat=-33.89;lon=151.27;zoom=15">(demo)</a>. I spent a bit of time on suburb and city labels as they are a really important feature of a map aimed at non-experts.</p>
<p>I&#8217;m finding making a non-trivial style like this has defiantly made me realise the difficulties of such a task.</p>
<p>There are a lot of improvements that can be made (either by modifying or making new components) to the OSM Mapping conventions, osm2pgsql/imposm, mapnik library, carto language stack. That said, the current form is still great and you can still make great maps. But,</p>
<table>
<tr>
<th>I would like to be able to</th>
<th>but this needs</th>
</tr>
<tr>
<td>have labels for large bays at lower zooms than small bays</td>
<td>need bays mapped as closed ways covering their area, rather than a point in the centre</td>
</tr>
<tr>
<td>define a linear function for the size of icons. i.e. at z10 the icon is 10px, at z20 the icon is 20px, now linearly interpolate all sizes for zooms in between</td>
<td>either build this functionality into the carto language, or make another higher level macro like language which you can code this in which is then compiled into carto</td>
</tr>
<tr>
<td>render spread text inside a riverbank</td>
<td>needs functionality in the mapnik rendering engine</td>
</tr>
</table>
<h2>Static OSM Tiles</h2>
<p>I&#8217;m still yet to find a tile server which is fast and works well with lighttpd (nginx would probably suffice too). As an experiment I decided to pre-render a bunch of tiles for my hybrid style sheet. This tile layer doesn&#8217;t need to be minutely updated, anyone who needs that can use the normal mapnik layer. Also static tiles server straight from the webserver should be pretty fast (maybe on memcached tiles would be faster) and I wanted my tiles to be fast.</p>
<p>Next up how can I generate these static tiles? There is the popular <a href="http://svn.openstreetmap.org/applications/rendering/mapnik/generate_tiles.py">generate_tiles.py</a>, but that won&#8217;t render meta tiles, seems like such a waste to render every tile with a buffer of 128px when I would render a 5 by 5 meta tile of the same buffer for only 36% of the total pixels rendered. The larger the meta tiles the larger the latency, but if I&#8217;m pre-rendering them all than latency doesn&#8217;t matter any more.</p>
<p>So I wrote a <a href="https://gist.github.com/1397377">C++ program</a> as my replacement for generate_tiles.py. I also programmed it to render from a list of meta tiles rather than a bbox. This means for my demo I can only render high zooms where there is nearmap coverage. This is where <a href="https://github.com/andrewharvey/OSMTileListFromGeometry/">https://github.com/andrewharvey/OSMTileListFromGeometry/</a> came in, which pulls nearmap coverage areas from an osm2pgsql database, and generates a list of meta tiles.</p>
<p>Using this method I rendered up to and including zoom 17, composed of 22444 5 by 5 meta tiles or 561100 regular tiles in a time of,</p>
<pre>real    198m17.021s
user    103m49.985s
sys     37m36.117s</pre>
<p>with disk usage,</p>
<pre>
&lt;1M   0-8
2.0M  9
6.8M  10
26M   11
98M   12
13M   13
36M   14
114M  15
411M  16
1.5G  17
========
2.2G  total
</pre>
<p>(Updated with results when using &#8220;png&#8221; rather than &#8220;png256&#8243;)</p>
<pre>real    228m17.082s
user    160m24.725s
sys     31m42.653s</pre>
<p>with disk usage,</p>
<pre>
&lt;1M   0-8
3.1M  9
8.6M  10
28M   11
121M  12
34M   13
83M   14
218M  15
663M  16
2.0G  17
========
3.1G total
</pre>
<p>I think that time could still be sped up with,</p>
<ul>
<li>tuning of the mapnik stylesheet queries</li>
<li>tuning of the postgres database</li>
<li>spanning more rendering threads</li>
<li>using larger meta tiles</li>
<li>using a machine with more that 512MB of RAM</li>
<li>not running minutely updates in the background</li>
</ul>
<h2>Git Rebase</h2>
<p>As I use git more and more I&#8217;m slowing learning more of the features it has to offer (and thanks to the free hosting by github). One such feature which I think is awesome is git rebase. As an example the other day I did <code>git commit -ammend</code> instead of <code>git commit --amend</code> (I knew there was a duplicate character somewhere but because I seem to have a tint of dyslexia I confused the duplicate &#8212; with mm).</p>
<p>Of course this resulted in committing all files which had changed with a message of &#8220;mend&#8221; as a new commit. I did this twice, and only noticed after I had already made a bunch of correct commits afterwards. With git rebase I could pop some commits of the commit stack, remove the two &#8220;mend&#8221; commits fix the commit which I should have been amended to and pop my other commits back on top of the stack.</p>
<p>Thanks to <a href="http://stackoverflow.com/a/180085">http://stackoverflow.com/a/180085</a>.</p>
<h2>Next Up</h2>
<ul>
<li>build a daily OSM planet extract by pushing minute-replicate files into the osmosis psql simple schema, then dumping to an OSM file</li>
<li>use this OSM file as a basis for monav and an OSRM service for fosm data</li>
<li>run a name finder service for fosm data</li>
<li>more updates to the hybrid map style</li>
<li>render the hybrid style tiles as oblique images for nearmap multiview</li>
</ul>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/dev/'>dev</a>, <a href='http://andrewharvey4.wordpress.com/tag/geo/'>geo</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1353/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1353&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2011/12/11/development-update-static-osm-tiles-git-rebase-map-labelling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>
	</item>
		<item>
		<title>OSMT</title>
		<link>http://andrewharvey4.wordpress.com/2011/10/09/osmt/</link>
		<comments>http://andrewharvey4.wordpress.com/2011/10/09/osmt/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 07:00:40 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1327</guid>
		<description><![CDATA[I feel the map style I&#8217;ve been working on recently is in good enough shape to announce. It is written in carto and designed to be used with OpenStreetMap data. It is an overlay layer for aerial imagery, though in my example I use NearMap imagery. Take a look at http://tianjara.net/osmt.html. The source is at [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1327&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I feel the map style I&#8217;ve been working on recently is in good enough shape to announce. It is written in carto and designed to be used with OpenStreetMap data. It is an overlay layer for aerial imagery, though in my example I use NearMap imagery.</p>
<p>Take a look at <a href="http://tianjara.net/osmt.html">http://tianjara.net/osmt.html</a>.</p>
<p>The source is at <a href="https://github.com/andrewharvey/osm-hybrid-carto/">https://github.com/andrewharvey/osm-hybrid-carto/</a>, licensed CC-BY-SA.</p>
<p>There is still lots of work to do on it though.</p>
<p>I also have a lightweight cycle-overlay too (view example at <a href="http://tianjara.net/leaflet.html">http://tianjara.net/leaflet.html</a> and tick on the cycle overlay or view the code at <a href="https://gist.github.com/1216315">https://gist.github.com/1216315</a>)</p>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/geo/'>geo</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1327/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1327/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1327&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2011/10/09/osmt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>
	</item>
		<item>
		<title>All Roads Lead to Packaging for Debian</title>
		<link>http://andrewharvey4.wordpress.com/2011/09/12/all-roads-lead-to-packaging-for-debian/</link>
		<comments>http://andrewharvey4.wordpress.com/2011/09/12/all-roads-lead-to-packaging-for-debian/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 11:32:22 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1316</guid>
		<description><![CDATA[Just a quick update to say that I have exhausted all my options to build a latest .osm file from fosm.org minute-replicate osc files + a base .osm file from osm.org. Currently fosm.org is down, but I still want to edit on top of the latest data so I can submit my changesets when it [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1316&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Just a quick update to say that I have exhausted all my options to build a latest .osm file from fosm.org minute-replicate osc files + a base .osm file from osm.org. Currently fosm.org is down, but I still want to edit on top of the latest data so I can submit my changesets when it comes back online. This is proving to be more difficult that I thought. Although really it is a good thing as even though I&#8217;ve tried to ensure I have everything I need to rebuild fosm.org if it were to go down for good, I&#8217;m still not 100% sure as I haven&#8217;t tried, well now I get to try.</p>
<p>My first method was to use <a href="http://m.m.i24.cc/osmconvert.c">osmconvert</a> with the aid of the workflow given in <a href="https://github.com/rrankin/osmconvert/blob/e1fbb7319f92f338e0023d110a3098f5a979fd64/update_osm.sh">https://github.com/rrankin/osmconvert/blob/e1fbb7319f92f338e0023d110a3098f5a979fd64/update_osm.sh</a>. It was quite fast and it almost worked, but due to limitation of osmconvert it seems that it expects the objects to be sorted in the order given by the object IDs. We can either patch osmconvert to work around this, or sort the osc files&#8230;</p>
<p>Putting the first method on hold, I gave installing the rails port that runs the API at osm.org a go with the idea that I can load the changesets or osc files directly into the API or DB. I got it installed and got to the step of loading in my starting OSM .osm file from before the FOSM fork. <a href="http://wiki.openstreetmap.org/wiki/The_Rails_Port#Populating_the_database">http://wiki.openstreetmap.org/wiki/The_Rails_Port#Populating_the_database</a> even gives the command line to run, but osmosis didn&#8217;t like this. I believe the issue is fixed with later versions of osmosis though.</p>
<p>This leads me to require a later version of osmosis. I don&#8217;t really want to install osmosis from source using the upstream project&#8217;s method as it will pull in a bunch of 3rd party libraries using maven, so the only real option is to work to upgrade the debian package for osmosis. This isn&#8217;t easy either as I don&#8217;t know that much about ant/maven/ivy. I could spend I whole weekend just trying to update the debian package of osmosis and still get nowhere, all the time I&#8217;m just getting further away from my original goal which was to make some FOSM changesets from my latest trip while my memory is still fresh&#8230;</p>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/debian/'>debian</a>, <a href='http://andrewharvey4.wordpress.com/tag/dev/'>dev</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1316&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2011/09/12/all-roads-lead-to-packaging-for-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>
	</item>
		<item>
		<title>Using TileMill to make OpenStreetMap Map Stylesheets</title>
		<link>http://andrewharvey4.wordpress.com/2011/06/06/using-tilemill-to-make-openstreetmap-map-stylesheets/</link>
		<comments>http://andrewharvey4.wordpress.com/2011/06/06/using-tilemill-to-make-openstreetmap-map-stylesheets/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 12:20:32 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1305</guid>
		<description><![CDATA[A short time ago TileMill got support for PostGIS data sources. I&#8217;m really excited by this as it means you can use TileMill, which is very easy to use, having a gentle learning curve, to construct your own OpenStreetMap stylesheets and see the data being rendered using your style. This is great! e.g. in less [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1305&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A short time ago TileMill got support for PostGIS data sources. I&#8217;m really excited by this as it means you can use TileMill, which is very easy to use, having a gentle learning curve, to construct your own OpenStreetMap stylesheets and see the data being rendered using your style. This is great! e.g. in less than an hour I made this,</p>
<div id="attachment_1306" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2011/06/tilemill-style1.png"><img class="size-full wp-image-1306" title="tilemill-style1" src="http://andrewharvey4.files.wordpress.com/2011/06/tilemill-style1.png?w=595" alt="Map of Sydney made using TileMill from OSM Data."   /></a><p class="wp-caption-text">Map data © OpenStreetMap contributors, CC-BY-SA</p></div>
<p>Want a map which just shows the drainage network (which you can see from low zooms)? Easy.</p>
<div id="attachment_1307" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2011/06/tilemill-syd-drainage.png"><img class="size-full wp-image-1307" title="tilemill-syd-drainage" src="http://andrewharvey4.files.wordpress.com/2011/06/tilemill-syd-drainage.png?w=595" alt="Sydney Drainage Map"   /></a><p class="wp-caption-text">Map data © OpenStreetMap contributors, CC-BY-SA</p></div>
<p>I&#8217;m sure I&#8217;ll be publishing lots of new styles in the near future, one of which will be a style designed as an aerial image (NearMap) overlay. Exciting times ahead&#8230;</p>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/geo/'>geo</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1305/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1305&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2011/06/06/using-tilemill-to-make-openstreetmap-map-stylesheets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2011/06/tilemill-style1.png" medium="image">
			<media:title type="html">tilemill-style1</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2011/06/tilemill-syd-drainage.png" medium="image">
			<media:title type="html">tilemill-syd-drainage</media:title>
		</media:content>
	</item>
		<item>
		<title>Using ABS ASGS Data in OpenStreetMap</title>
		<link>http://andrewharvey4.wordpress.com/2011/03/17/using-abs-asgs-data-in-openstreetmap/</link>
		<comments>http://andrewharvey4.wordpress.com/2011/03/17/using-abs-asgs-data-in-openstreetmap/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 11:18:21 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[gov]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1288</guid>
		<description><![CDATA[A little while ago Marcus Blake from the Australian Bureau of Statistics asked the OSM community about the potential use of some ABS data. As I mentioned on the list I think it is good that at least some government departments are making their data available under free licenses and that they engage with with [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1288&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A little while ago Marcus Blake from the Australian Bureau of Statistics <a href="http://lists.openstreetmap.org/pipermail/talk-au/2011-February/007741.html">asked the OSM community</a> about the potential use of some ABS data. As I mentioned on the list I think it is good that at least some government departments are making their data available under free licenses and that they engage with with the community to sort out any technical details about the data.</p>
<p>As <a href="http://www.abs.gov.au/websitedbs/d3310114.nsf/home/australian+statistical+geography+standard+%28asgs%29">described by the ABS</a>, the ASGS is essentially data describing geographical areas.</p>
<div id="attachment_1290" class="wp-caption aligncenter" style="width: 590px"><a href="http://andrewharvey4.files.wordpress.com/2011/03/asgs-abs-structures.png"><img class="size-full wp-image-1290" title="asgs-abs-structures" src="http://andrewharvey4.files.wordpress.com/2011/03/asgs-abs-structures.png?w=595" alt=""   /></a><p class="wp-caption-text">ASGS ABS Structures - CC-BY 2.5 AU Australian Bureau of Statistics</p></div>
<div id="attachment_1291" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2011/03/asgs-non-abs-structures.gif"><img class="size-full wp-image-1291" title="asgs-non-abs-structures" src="http://andrewharvey4.files.wordpress.com/2011/03/asgs-non-abs-structures.gif?w=595" alt=""   /></a><p class="wp-caption-text">ASGS Non-ABS Structures - CC-BY 2.5 AU Australian Bureau of Statistics</p></div>
<p>Working out which if any structures should be incorporated into OSM and how needs careful consideration, and <a href="http://lists.openstreetmap.org/pipermail/talk-au/2011-February/007748.html">I&#8217;ve posted some of my thoughts to the list</a>. In the mean time, since the data does contain some landuse information I&#8217;ve been looking into how best to use this information to aid in mapping. A blind import is not an option in my opinion, but I thought it would be handy to see the data as a base map when mapping.</p>
<p>I did try using ogr2osm to convert the data to the OSM xml format to load into JOSM (I even got the translateAttributes function for ogr2osm working for this dataset), but due to the nature of the data, I think a simple raster underlay works well. I tried two approaches in parallel.</p>
<ol>
<li>shp -&gt; osm (using ogr2osm) -&gt; postgres (using osm2pgsql) -&gt; raster tiles (using mapnik).</li>
<li>Using GeoServer to serve a WMS which can be loaded into JOSM.</li>
</ol>
<p>Option 2 seemed to require less set up time. Simply used the GUI to load the shapefile, and <a href="https://gist.github.com/874161">apply a style</a>. Then load the WMS into JOSM.</p>
<div id="attachment_1295" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2011/03/nearmap-asb-mb-in-josm.jpg"><img class="size-full wp-image-1295" title="nearmap-asb-mb-in-josm" src="http://andrewharvey4.files.wordpress.com/2011/03/nearmap-asb-mb-in-josm.jpg?w=595" alt="ABS Mech Blocks with landuse styling in JOSM, with NearMap underlay."   /></a><p class="wp-caption-text">ABS Mech Blocks with landuse styling in JOSM, with NearMap underlay.</p></div>
<p>One caveat, if you want to load a WMS services from GeoServer into JOSM, I found the URL should look something like:</p>
<pre>http://localhost:8080/geoserver/wms?service=WMS&amp;version=1.1.0&amp;request=GetMap&amp;layers=<strong>workspace_name</strong>:<strong>layer_name</strong>&amp;styles=&amp;format=image/png&amp;</pre>
<p>Slightly unrelated but if you are using tomcat or jetty locally but only occasionally (like I do), I find it is best to use <tt>sysv-rc-conf</tt> (eg. <tt>sudo sysv-rc-conf tomcat6 off</tt>) to disable the tomcat or jetty daemon from running at boot, whilst still allowing you to start it (<tt>sudo service tomcat6 start</tt>) when you need it.</p>
<p>If anyone is interested in getting such data in JOSM and would like more details, just let me know.</p>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/geo/'>geo</a>, <a href='http://andrewharvey4.wordpress.com/tag/gov/'>gov</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1288/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1288&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2011/03/17/using-abs-asgs-data-in-openstreetmap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2011/03/asgs-abs-structures.png" medium="image">
			<media:title type="html">asgs-abs-structures</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2011/03/asgs-non-abs-structures.gif" medium="image">
			<media:title type="html">asgs-non-abs-structures</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2011/03/nearmap-asb-mb-in-josm.jpg" medium="image">
			<media:title type="html">nearmap-asb-mb-in-josm</media:title>
		</media:content>
	</item>
		<item>
		<title>Using XSLT to Transform XML data into OSM format</title>
		<link>http://andrewharvey4.wordpress.com/2011/02/14/using-xslt-to-transform-xml-data-into-osm-format/</link>
		<comments>http://andrewharvey4.wordpress.com/2011/02/14/using-xslt-to-transform-xml-data-into-osm-format/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 10:46:03 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1270</guid>
		<description><![CDATA[For a while I used to think that all there was to XML was &#60;blah attribute=&#8221;value&#8221;&#62;inner&#60;/blah&#62;, but of course there is much more. I&#8217;m now digging into the real stuff like XPath, XSLT and XML Schemas. I&#8217;ve come across a data set of bus stops (as well as live info on where buses are, and [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1270&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For a while I used to think that all there was to XML was &lt;blah attribute=&#8221;value&#8221;&gt;inner&lt;/blah&gt;, but of course there is much more. I&#8217;m now digging into the real stuff like XPath, XSLT and XML Schemas.</p>
<p>I&#8217;ve come across a data set of bus stops (as well as live info on where buses are, and their status). The bus stop data set (<a href="http://nswbusdata.info/ptipslivedata/getptipslivedata?filename=stopdescriptions.zip">http://nswbusdata.info/ptipslivedata/getptipslivedata?filename=stopdescriptions.zip</a>, no longer active so I&#8217;m hosting my original copies at <a href="http://tianjara.net/data/nsw-buses/">http://tianjara.net/data/nsw-buses/</a> for preservation) is in an XML format,</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;StopDescriptionList license="http://creativecommons.org/licenses/by-nc-nd/3.0/au/" copyright="NSW Roads and Traffic Authority"&gt;
    &lt;stop longitude="151.17832" latitude="-33.81852" tsndescription="Osborne Rd nr Ronald Av" TSN="206699"/&gt;
    &lt;stop longitude="151.17359" latitude="-33.8082" tsndescription="Ralston St nr Murray St" TSN="2066138"/&gt;
    &lt;stop longitude="151.17764" latitude="-33.82054" tsndescription="Second Av nr Osborne Rd" TSN="206698"/&gt;
    &lt;stop longitude="151.17629" latitude="-33.81926" tsndescription="Fourth Av nr Second Av" TSN="206697"/&gt;
  ...</pre>
<p>Although because of the license, I cannot use this data in OpenStreetMap, I was still interested in converting it into an a .osm file. The perfect job for XSLT!</p>
<p>It turned out to be quite a simple task with a neat solution. My XSLT stylesheet used to do the translation:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt;
    &lt;xsl:output method="xml" indent="yes"/&gt; 

    &lt;xsl:template match="/StopDescriptionList"&gt;
        &lt;osm version='0.6' generator='XSLT'&gt;
            &lt;xsl:apply-templates select="stop"/&gt;
        &lt;/osm&gt;
    &lt;/xsl:template&gt;

    &lt;xsl:template match="stop"&gt;
        &lt;xsl:variable name="count"&gt;
            &lt;xsl:number/&gt;
        &lt;/xsl:variable&gt;

        &lt;node id='-{$count}' lat="{@latitude}" lon="{@longitude}"&gt;
            &lt;tag k='ref:tsn' v='{@TSN}' /&gt;
            &lt;tag k='fixme' v='{@tsndescription}' /&gt;
        &lt;/node&gt;
    &lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;</pre>
<p>Then it was a just a simple,</p>
<pre>xsltproc -o busses.osm busses-stylesheet.xslt stopdescription.xml</pre>
<p>The data is CC BY-NC-ND 3.0, but they sneak in some additional terms in the fine print, which in addition to the NC-ND would further lead to incompatibilities with the OSM license, and would under my definition of free data, make this data set non-free. For interest the first three additional terms are,</p>
<blockquote>
<ol>
<li>You must not use the Data in any way that could create false or misleading outcomes or interpretations, or bring the RTA into ridicule or disrepute. You must not use the Data in conjunction with the promotion of alcohol or unsafe road practices.</li>
<li>You must ensure that the Data used is current, and provide details as to the date and time of sourcing the Data from the RTA in all reproductions of the Data (including in any software applications incorporating the Data).</li>
<li>In all reproductions of the Data (including in any software applications incorporating the Data), the following disclaimer must be provided: “The accuracy or suitability of the Data is not verified and it is provided on an “as is” basis.”</li>
</ol>
</blockquote>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/dev/'>dev</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1270/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1270/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1270&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2011/02/14/using-xslt-to-transform-xml-data-into-osm-format/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>
	</item>
		<item>
		<title>OSM user history heatmap</title>
		<link>http://andrewharvey4.wordpress.com/2011/01/16/osm-user-history-heatmap/</link>
		<comments>http://andrewharvey4.wordpress.com/2011/01/16/osm-user-history-heatmap/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 10:06:23 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1245</guid>
		<description><![CDATA[In the past few months I&#8217;ve been contributing to the OpenStreetMap database. From the day I started I&#8217;ve had privacy concerns on my mind. If a criminal goes around committing crimes, leaving behind a signature and always travelling x km from home to commit the crime, you get a nice circle around their home. So [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1245&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In the past few months I&#8217;ve been contributing to the <a href="http://www.openstreetmap.org/">OpenStreetMap</a> database. From the day I started I&#8217;ve had privacy concerns on my mind. If a criminal goes around committing crimes, leaving behind a signature and always travelling x km from home to commit the crime, you get a nice circle around their home. So I&#8217;m interested to see what kind of pattern I&#8217;m leaving behind. Someone else has probably got an existing solution out there, but I decided to experiment and put together something myself.</p>
<p>I already had all my osmChange files (i.e. the ones from <a href="http://www.openstreetmap.org/api/0.6/changeset/$" rel="nofollow">http://www.openstreetmap.org/api/0.6/changeset/$</a>{changeset_id}/download). I pull these daily from <a href="http://api.openstreetmap.org/api/0.6/changesets?display_name=aharvey" rel="nofollow">http://api.openstreetmap.org/api/0.6/changesets?display_name=aharvey</a> find the changeset ids and download the osmChange files for all my new changesets. I do this as I try to keep a local copy of things I upload into the cloud, as a backup in case the service I uploaded to ever decides to cut my access. I know I should really be saving a copy of what I upload, rather than uploading then asking the cloud server for a copy, but JOSM uploads a full osm file, not an osmChange file. <a href="https://github.com/andrewharvey/OpenStreetMap-User-Edits-Heatmap/tree/master/osmChange_files">Scripts here</a>.</p>
<p>Anyway, from these osmChange files I pull out the coordinates of all the nodes I created or modified, <a href="https://github.com/andrewharvey/OpenStreetMap-User-Edits-Heatmap/blob/master/extract-nodes.pl">script here</a>.</p>
<p>From this list of points I could use any heat map program. <a href="http://code.google.com/p/gheat/">gheat</a> which is based on <a href="http://blog.corunet.com/the-definitive-heatmap/">http://blog.corunet.com/the-definitive-heatmap/</a> looks good. The problem is I ran out of time setting it up– it wasn&#8217;t in the Debian repository. Instead I used <a href="http://www.sethoscope.net/heatmap/">http://www.sethoscope.net/heatmap/</a>, which I combined with a <a href="https://github.com/andrewharvey/OpenStreetMap-User-Edits-Heatmap/blob/master/render-heatmap-to-tiles.pl">wrapper script</a> to render to tiles in the <a href="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames">OSM Slippy Map format</a>. However it is really slow– perhaps I should try to speed it up.</p>
<p>Now that I had the transparent heat map tiles, the next step was to get these on top of an OpenStreetMap map. Given they are in the standard format, it should be really easy to add this layer to any software that lets you view OSM tiles. Support for overlays like this in libchamplain is on my todo list, in the meantime I gave <a href="http://polymaps.org">Polymaps</a> a try, <a href="https://github.com/andrewharvey/OpenStreetMap-User-Edits-Heatmap/blob/master/polymaps-overlay.html">HTML with JavaScript embedded here</a>.</p>
<div id="attachment_1246" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2011/01/osmchange-heatmap.png"><img class="size-full wp-image-1246" title="osmchange-heatmap" src="http://andrewharvey4.files.wordpress.com/2011/01/osmchange-heatmap.png?w=595" alt="Heat map image of my created or modified nodes in OpenStreetMap"   /></a><p class="wp-caption-text">Heat map image of my created or modified nodes in OpenStreetMap</p></div>
<p>The results don&#8217;t come as much of a surprise, I already knew which areas I edit and how much. This map is also biased towards nodes, and doesn&#8217;t take into account editing an existing way or relation. One surprise was some cosmetic work along creeks shows up as  nice lines (tracing a creek adds a lot more nodes than adding a single toilet node)&#8230;</p>
<h2>Postscript</h2>
<p>While I was working on this I once again needed a bbox string to test with. This has come up a lot in the past and I didn&#8217;t know any easily way to use a GUI to position the map, and then just copy and paste the bounding box of that view. So <a href="http://gitorious.org/libchamplain/andrewharveys-experiments-mainline/commit/1b3babbc0804ca3fab1566e8198620416a950455">I made a modification to one of the libchamplain demos</a> to return a bounding box from the current view.</p>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/geo/'>geo</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1245/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1245&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2011/01/16/osm-user-history-heatmap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2011/01/osmchange-heatmap.png" medium="image">
			<media:title type="html">osmchange-heatmap</media:title>
		</media:content>
	</item>
		<item>
		<title>Old Maps Online</title>
		<link>http://andrewharvey4.wordpress.com/2010/11/28/old-maps-online/</link>
		<comments>http://andrewharvey4.wordpress.com/2010/11/28/old-maps-online/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 06:38:53 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[geo]]></category>
		<category><![CDATA[gov]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1228</guid>
		<description><![CDATA[I should have made a post about this a while ago, but I didn&#8217;t want a half complete post, and the scope of my project kept expanding! Part 1: Scraping I found two huge repositories of old digitised maps of Australia, many of which are in the public domain. The National Library of Australia and [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1228&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I should have made a post about this a while ago, but I didn&#8217;t want a half complete post, and the scope of my project kept expanding!</p>
<h2>Part 1: Scraping</h2>
<p>I found two huge repositories of old digitised maps of Australia, many of which are in the public domain. The <a href="http://nla.gov.au/">National Library of Australia</a> and <a href="http://parishmaps.lands.nsw.gov.au/pmap.html">Parish Maps from the Department of Lands NSW</a>. Unfortunately they didn&#8217;t really have a nice documented RESTfull API for the use of the images and metadata. My first step was to extract as much information as I could and convert it into an intermediate format. Most of my code and documentation for doing this is at <a href="https://github.com/andrewharvey/govscrape">https://github.com/andrewharvey/govscrape</a> in those two respective folders. Unfortunately it&#8217;s not as easy as running one command from my repo to download and parse all the data. My goal was to get the data to my machine, not write a robust system that anyone could run to get a clone of the nla and pmap repositories.</p>
<h2>Part 2: Georeferencing</h2>
<p>It would be great if I could push out an easy to use API for the data I collected from the scrape stage, but I don&#8217;t have the resources (let me know if you are willing to help out with server resources to host these old public domain maps). Even without a nice interface to the data, I could still play around with it and to see what use I could make of it. I dabbled into using these maps as a source of data for OpenStreetMap. I only got through a few of the maps, I put this on hold as I figured it would be easier (especially for others) to do this if they were georeferenced. I tried out both <a href="http://warper.geothings.net/" rel="nofollow">http://warper.geothings.net/</a> and QuantumGIS, but both had way to much lagging. So I rolled out my own solution which was just a bunch of scripts which used Inkscape and a hacked libchamplain demo as the GUI. The code and documentation for this is at <a href="https://github.com/andrewharvey/georeferencing-scripts">https://github.com/andrewharvey/georeferencing-scripts</a>.</p>
<p>The georeferencing data that I have made so far (it&#8217;s a big task!) is at <a href="https://github.com/andrewharvey/georeferencing-data">https://github.com/andrewharvey/georeferencing-data</a>.</p>
<h2>Part 3: Sharing</h2>
<p>From the data and code from the last step, I&#8217;m able to push out these old maps in several formats. I used gdalwarp to convert the maps into Transverse Mercator (well actually I don&#8217;t really know what they are, but this seems to work), from here I can use gdal2tiles.py (&#8230;finally understanding the difference between OSM Slippy map tilesnames and the OGC TMS&#8230; take note that gdal2tiles.py produces TMS format tiles which differs from OSM style as it has the y axis going bottom to top, see <a href="http://groups.google.com/group/maptiler/browse_thread/thread/aa89fc726b8f7261/8bdc39d7829cc80c" rel="nofollow">http://groups.google.com/group/maptiler/browse_thread/thread/aa89fc726b8f7261/8bdc39d7829cc80c</a>) to push out an OSM slippy map like tile directory, I can push out a KML GroundOverlay, or you could probably use a WMS server to push it out through WMS. I really wanted to leave it open.</p>
<div id="attachment_1235" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-on-osmmapnik-in-openlayers.png"><img class="size-full wp-image-1235" title="oldmap-on-osmmapnik-in-openlayers" src="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-on-osmmapnik-in-openlayers.png?w=595" alt=""   /></a><p class="wp-caption-text">Overlay from public domain map, <a href="http://nla.gov.au/nla.map-rm2795" rel="nofollow">http://nla.gov.au/nla.map-rm2795</a>. Background CC BY-SA 2.0 OpenStreetMap Contributors, <a href="http://www.openstreetmap.org/" rel="nofollow">http://www.openstreetmap.org/</a></p></div>
<div id="attachment_1236" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-in-josm.png"><img class="size-full wp-image-1236" title="oldmap-in-josm" src="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-in-josm.png?w=595" alt="Parishmap as backgrop in JOSM."   /></a><p class="wp-caption-text">Parishmap as backgrop in JOSM. Data CC BY-SA 2.0 OpenStreetMap Contributors, <a href="http://www.openstreetmap.org/" rel="nofollow">http://www.openstreetmap.org/</a>. Background public domain map PMapMN04/14015601.</p></div>
<div id="attachment_1237" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-on-osmmapnik-in-openlayers2.png"><img class="size-full wp-image-1237" title="oldmap-on-osmmapnik-in-openlayers2" src="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-on-osmmapnik-in-openlayers2.png?w=595" alt="Parish map overlaid on OSM mapnik layer."   /></a><p class="wp-caption-text">Overlay from public domain map, PMapMN04/14015601. Background CC BY-SA 2.0 OpenStreetMap Contributors, <a href="http://www.openstreetmap.org/" rel="nofollow">http://www.openstreetmap.org/</a></p></div>
<p>I would post a Google Earth one too, but its too much effort to get a free background in there for the screenshot. I&#8217;m not convinced that this display of the data is user friendly. Having control of the transparency of the overlay is a must. Maybe one day, someone will crop out all the non-map parts of the parish maps so we can get a single whole of NSW parish map slippy map.</p>
<p>I suppose now I need to focus on the infrastructure. It should be really easy for a user to browse the available maps and view them either as a KML, an OpenLayers overlay. I should also plug this into the meta-data I scraped and have stored in CSV like files.</p>
<p>The problem I have with distribution right now is that many of the maps need warping and that means I need to host the warped image somewhere. Some could probably be georeferenced from their source image using just translate, scale and rotate, and hence should be able to use the source image from the government server to serve the georeferenced imagery. But the work flow I&#8217;ve set up so far, relies on using gdalwarp, and hence having access to the warped image.</p>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/geo/'>geo</a>, <a href='http://andrewharvey4.wordpress.com/tag/gov/'>gov</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1228&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2010/11/28/old-maps-online/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-on-osmmapnik-in-openlayers.png" medium="image">
			<media:title type="html">oldmap-on-osmmapnik-in-openlayers</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-in-josm.png" medium="image">
			<media:title type="html">oldmap-in-josm</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2010/11/oldmap-on-osmmapnik-in-openlayers2.png" medium="image">
			<media:title type="html">oldmap-on-osmmapnik-in-openlayers2</media:title>
		</media:content>
	</item>
		<item>
		<title>Slippy Map Tilenames For Non-North [Isometric] Web Maps</title>
		<link>http://andrewharvey4.wordpress.com/2010/11/28/slippy-map-tilenames-for-non-north-isometric-web-maps/</link>
		<comments>http://andrewharvey4.wordpress.com/2010/11/28/slippy-map-tilenames-for-non-north-isometric-web-maps/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 04:01:19 +0000</pubDate>
		<dc:creator>Andrew Harvey</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[nearmap]]></category>
		<category><![CDATA[osm]]></category>

		<guid isPermaLink="false">http://andrewharvey4.wordpress.com/?p=1226</guid>
		<description><![CDATA[I made this image to help my understand a slippy map tile naming system for maps that don&#8217;t always point North (it turns out nothing changes in terms of the tile numbering, you just have to apply additional view space transformations). This is how Nearmap does it, and when I get around to putting up [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1226&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I made this image to help my understand a slippy map tile naming system for maps that don&#8217;t always point North (it turns out nothing changes in terms of the tile numbering, you just have to apply additional view space transformations).  This is how Nearmap does it, and when I get around to putting up <a href="http://osm.kyblsoft.cz/3dmapa/" rel="nofollow">http://osm.kyblsoft.cz/3dmapa/</a> like tiles of Sydney I will endeavor to use the same system (in other words you put your code to view the other views in your map viewer application, rather than just change the tile numbering so that you can use existing code for all the views). It doesn&#8217;t really change anything here if we have square or non-square tiles, the tile numbers and true coordinates don&#8217;t change because of this. Keep in mind that all the points  of tile z/y/x for any of these views will be the geographic location, the views just have a different view space translation.</p>
<div id="attachment_1227" class="wp-caption aligncenter" style="width: 610px"><a href="http://andrewharvey4.files.wordpress.com/2010/11/isometric_tiles.png"><img class="size-full wp-image-1227" title="North South East West Tilenames" src="http://andrewharvey4.files.wordpress.com/2010/11/isometric_tiles.png?w=595" alt="Tile names for Noth, South, East and West views"   /></a><p class="wp-caption-text">Diagram CC BY-SA. Map tiles CC BY-SA based on CC BY-SA data from <a href="http://www.openstreetmap.org" rel="nofollow">http://www.openstreetmap.org</a>.</p></div>
<p style="text-align:left;">see also: <a href="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames">http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames</a></p>
<br />Filed under: <a href='http://andrewharvey4.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://andrewharvey4.wordpress.com/tag/nearmap/'>nearmap</a>, <a href='http://andrewharvey4.wordpress.com/tag/osm/'>osm</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewharvey4.wordpress.com/1226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewharvey4.wordpress.com/1226/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewharvey4.wordpress.com&#038;blog=5148276&#038;post=1226&#038;subd=andrewharvey4&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewharvey4.wordpress.com/2010/11/28/slippy-map-tilenames-for-non-north-isometric-web-maps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/28043c88c4d0c2700ec793045d0ebe91?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=PG" medium="image">
			<media:title type="html">andrewharvey4</media:title>
		</media:content>

		<media:content url="http://andrewharvey4.files.wordpress.com/2010/11/isometric_tiles.png" medium="image">
			<media:title type="html">North South East West Tilenames</media:title>
		</media:content>
	</item>
	</channel>
</rss>