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

<channel>
	<title>Chris' GISmo's &#187; Search Results  &#187;  routing</title>
	<atom:link href="http://blog.webmapper.com.au/?s=routing&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.webmapper.com.au</link>
	<description>Not another GIS blog</description>
	<lastBuildDate>Tue, 01 Jun 2010 05:22:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Quick weekly wrapup</title>
		<link>http://blog.webmapper.com.au/2006/10/08/quick-weekly-wrapup/</link>
		<comments>http://blog.webmapper.com.au/2006/10/08/quick-weekly-wrapup/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 15:31:19 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2006/10/08/quick-weekly-wrapup/</guid>
		<description><![CDATA[Five quickies &#8230;

Openlayers gets a nice plug on the popular ajaxian blog. Unfortunately its not exactly well written and it left even me questioning the point of the post. Ah well, publicity is publicity i guess
UMN Mapserver 4.10 was released with a few new goodies such as curved labelling, improved mapscript service support and various [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2006/09/17/walis-wrapup/' rel='bookmark' title='Permanent Link: WALIS wrapup'>WALIS wrapup</a></li>
<li><a href='http://blog.webmapper.com.au/2006/09/15/google-half-bakes-wms-support/' rel='bookmark' title='Permanent Link: Google half bakes WMS support'>Google half bakes WMS support</a></li>
<li><a href='http://blog.webmapper.com.au/2007/01/22/google-earth-wms-still-undercooked/' rel='bookmark' title='Permanent Link: Google Earth WMS still undercooked'>Google Earth WMS still undercooked</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Five quickies &#8230;</p>
<ol>
<li>Openlayers gets a <a href="http://ajaxian.com/archives/opensurvey-google-maps-for-the-rest-of-us">nice plug</a> on the popular ajaxian blog. Unfortunately its not exactly well written and it left even me questioning the point of the post. Ah well, publicity is publicity i guess</li>
<li>UMN <a href="http://mapserver.gis.umn.edu/download/current/">Mapserver 4.10</a> was released with a few new goodies such as curved labelling, improved mapscript service support and various other bug fixes. Surprised no one else picked up on this &#8230; i&#8217;m sure <a href="http://www.maptools.org/ms4w">ms4w</a> builds will be updated in the coming week.</li>
<li>For those not attending FOSS4G and missed out on the PgRouting sessions, Lorenzo has pleaded with me to give the <a href="http://www.orkney.jp/postlbs-cms/">project a plug</a>. A bit late i know, but check out the awesome prototype whipped up with <a href="http://ka-map.maptools.org/">Kamap</a> <a href="http://kappa.gonfi.org/dev/gonfi-ka-map/htdocs/index_routing.html">here</a>. Select the tool that looks like a pin to define the start/end points on the map, and then wait for the route to be updated.</li>
<li>Geoserver is at <a href="http://docs.codehaus.org/display/GEOS/Latest">1.4M2</a> &#8230; and even though its beta, it now has KML reprojection support (yay!). The guys can&#8217;t make it much easier for the average joe to serve their data into GE now, winner.</li>
<li><a href="http://whatnick.blogspot.com">What_nick</a> has been working on the improved <a href="http://worldwind.arc.nasa.gov">WorldWind</a> WMS/WFS plugins and has assured me it will make it into the next release (1.4?). Other good news is the smaller footprint that <a href="http://bullsworld.blogspot.com/2006/10/world-wind-136-14-and-15-status.html">Bull mentioned</a> in his post because of the move to using WFS for placenames rather than bundling the data with the download.</li>
</ol>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2006/09/17/walis-wrapup/' rel='bookmark' title='Permanent Link: WALIS wrapup'>WALIS wrapup</a></li>
<li><a href='http://blog.webmapper.com.au/2006/09/15/google-half-bakes-wms-support/' rel='bookmark' title='Permanent Link: Google half bakes WMS support'>Google half bakes WMS support</a></li>
<li><a href='http://blog.webmapper.com.au/2007/01/22/google-earth-wms-still-undercooked/' rel='bookmark' title='Permanent Link: Google Earth WMS still undercooked'>Google Earth WMS still undercooked</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2006/10/08/quick-weekly-wrapup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PGdijkstra Routing performance</title>
		<link>http://blog.webmapper.com.au/2006/06/14/pgdijkstra-routing-performance/</link>
		<comments>http://blog.webmapper.com.au/2006/06/14/pgdijkstra-routing-performance/#comments</comments>
		<pubDate>Wed, 14 Jun 2006 13:13:45 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2006/06/14/pgdijkstra-routing-performance/</guid>
		<description><![CDATA[I have gotten a surprising amount of questions since i posted my routing articles using Cartoweb&#8217;s pgdijkstra PostGIS pl/sql functions. A lot have focused around the speed of the routing calculations, especially in comparison with commercial offerings.
Disclaimer: This should only aid in you decision making. I definately would not consider using pgdjikstra to replace emergency [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/11/11/opensource-routing-tools/' rel='bookmark' title='Permanent Link: Opensource routing tools'>Opensource routing tools</a></li>
<li><a href='http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/' rel='bookmark' title='Permanent Link: Build your own routing solution'>Build your own routing solution</a></li>
<li><a href='http://blog.webmapper.com.au/2006/02/05/adding-routing-overlays-to-kamap/' rel='bookmark' title='Permanent Link: Adding routing overlays to kamap'>Adding routing overlays to kamap</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have gotten a surprising amount of questions since i posted my <a href="http://chris.narx.net/index.php?s=routing">routing articles</a> using Cartoweb&#8217;s <a href="http://www.cartoweb.org/contribs.html#pgdijkstra">pgdijkstra</a> <a href="http://postgis.refractions.net">PostGIS</a> pl/sql functions. A lot have focused around the speed of the routing calculations, especially in comparison with commercial offerings.</p>
<p><em>Disclaimer:</em> This should only aid in you decision making. I definately would not consider using pgdjikstra to replace emergency vehicles routing and travelling salesmen type problems. Considerable work would need to be added to flesh out commonly requested features such as turn by turn navigation</p>
<p>Alright, lets see how we went &#8230;</p>
<p class="MsoNormal"><strong>Sample dataset</strong>: 57k vertices, 44k nodes</p>
<p class="MsoNormal"><strong>Machine specs:</strong> P4 Celeron M 2.6ghz Laptop, 512mb RAM, PostgreSQL 8.1</p>
<p class="MsoNormal">Sample queries are using the following function,</p>
<p class="MsoNormal"><em><span style="color: #3366ff">SELECT astext(the_geom) FROM shortest_path_as_geometry(‘roadstable’, startnode, endnode)</span></em></p>
<table cellspacing="0" cellpadding="0" border="1" style="border: medium none ; border-collapse: collapse" class="MsoTableGrid">
<tr>
<td valign="top" style="border: 1pt solid windowtext; padding: 0cm 5.4pt; width: 76px">
<p align="center" style="text-align: center" class="MsoNormal"><strong>uery</strong></p>
</td>
<td valign="top" style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 72px">
<p align="center" style="text-align: center" class="MsoNormal"><strong>Key</strong></p>
</td>
<td valign="top" style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 76px">
<p align="center" style="text-align: center" class="MsoNormal"><strong>From</strong></p>
</td>
<td valign="top" style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 71px">
<p align="center" style="text-align: center" class="MsoNormal"><strong>To</strong></p>
</td>
<td valign="top" style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 158px">
<p align="center" style="text-align: center" class="MsoNormal"><strong>Path Size</strong></p>
<p align="center" style="text-align: center" class="MsoNormal"><strong>(coord pairs)</strong></p>
</td>
<td valign="top" style="border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0cm 5.4pt; width: 115px">
<p align="center" style="text-align: center" class="MsoNormal"><strong>Query Time</strong></p>
</td>
</tr>
<tr>
<td valign="top" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">1</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; background: yellow none repeat scroll 0% 50%; width: 72px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal">
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">219102</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 71px">
<p class="MsoNormal">181359</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 158px">
<p class="MsoNormal">792</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 115px">
<p align="right" style="text-align: right" class="MsoNormal">984.056 ms</p>
</td>
</tr>
<tr>
<td valign="top" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">2</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; background: #ffc622 none repeat scroll 0% 50%; width: 72px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal">
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">216366</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 71px">
<p class="MsoNormal">179845</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 158px">
<p class="MsoNormal">738</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 115px">
<p align="right" style="text-align: right" class="MsoNormal">1289.002 ms</p>
</td>
</tr>
<tr>
<td valign="top" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">3</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; background: #192c2c none repeat scroll 0% 50%; width: 72px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal">
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">229280</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 71px">
<p class="MsoNormal">188416</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 158px">
<p class="MsoNormal">586</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 115px">
<p align="right" style="text-align: right" class="MsoNormal">871.655 ms</p>
</td>
</tr>
<tr>
<td valign="top" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">4</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; background: #002c9a none repeat scroll 0% 50%; width: 72px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal">
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">205276</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 71px">
<p class="MsoNormal">197586</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 158px">
<p class="MsoNormal">660</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 115px">
<p align="right" style="text-align: right" class="MsoNormal">1421.800 ms</p>
</td>
</tr>
<tr>
<td valign="top" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">5</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; background: #32007c none repeat scroll 0% 50%; width: 72px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal">
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">229280</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 71px">
<p class="MsoNormal">179038</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 158px">
<p class="MsoNormal">941</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 115px">
<p align="right" style="text-align: right" class="MsoNormal">2180.597 ms</p>
</td>
</tr>
<tr>
<td valign="top" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">6</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; background: #ff904e none repeat scroll 0% 50%; width: 72px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal">
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">209203</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 71px">
<p class="MsoNormal">206037</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 158px">
<p class="MsoNormal">491</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 115px">
<p align="right" style="text-align: right" class="MsoNormal">1101.798 ms</p>
</td>
</tr>
<tr>
<td valign="top" style="border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; border-width: medium 1pt 1pt; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">7</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; background: #19ff86 none repeat scroll 0% 50%; width: 72px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal">
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 76px">
<p class="MsoNormal">203982</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 71px">
<p class="MsoNormal">193450</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 158px">
<p class="MsoNormal">208</p>
</td>
<td valign="top" style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0cm 5.4pt; width: 115px">
<p align="right" style="text-align: right" class="MsoNormal">755.187 ms</p>
</td>
</tr>
</table>
<p><a class="imagelink" title="Routing geometry" href="http://chris.narx.net/wp-content/uploads/2006/06/routing.GIF" /><a class="imagelink" title="Routing geometry" href="http://chris.narx.net/wp-content/uploads/2006/06/routing.GIF"><img width="128" height="90" id="image123" alt="Routing geometry" src="http://chris.narx.net/wp-content/uploads/2006/06/routing.GIF" /></a><br />
Click to enlarge!</p>
<p>Considering my laptop is definately not the best benchmark machine, I can only assume that deployment on a proper server environment would result in a significant performance increase across the board.</p>
<p>Interesting stuff! Head over to <a href="http://www.cartoweb.org">cartoweb.org</a> to give Sylvain and his crew any feedback or bugs. I havent checked lately but i&#8217;m sure the CVS version have had some improvements.</p>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/11/11/opensource-routing-tools/' rel='bookmark' title='Permanent Link: Opensource routing tools'>Opensource routing tools</a></li>
<li><a href='http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/' rel='bookmark' title='Permanent Link: Build your own routing solution'>Build your own routing solution</a></li>
<li><a href='http://blog.webmapper.com.au/2006/02/05/adding-routing-overlays-to-kamap/' rel='bookmark' title='Permanent Link: Adding routing overlays to kamap'>Adding routing overlays to kamap</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2006/06/14/pgdijkstra-routing-performance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google maps finally gets aus data</title>
		<link>http://blog.webmapper.com.au/2006/05/19/google-maps-finally-gets-aus-data/</link>
		<comments>http://blog.webmapper.com.au/2006/05/19/google-maps-finally-gets-aus-data/#comments</comments>
		<pubDate>Fri, 19 May 2006 01:03:34 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[GIS News]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2006/05/19/google-maps-finally-gets-aus-data/</guid>
		<description><![CDATA[Seems as though Google Maps has finally integrated the PSMA dataset. Just had a quick look and the data seems to be fairly recent.
I feel sorry for the zoomin guys as no doubt their target audience has all but dissappeared over night (until of course businesses read googles licencing arrangements  ).
Has anyone been able [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/12/15/google-maps-to-extend-development-into-aus/' rel='bookmark' title='Permanent Link: Google Maps to extend development into Aus'>Google Maps to extend development into Aus</a></li>
<li><a href='http://blog.webmapper.com.au/2006/07/09/google-earths-issue-logging/' rel='bookmark' title='Permanent Link: Google Earth&#8217;s Issue logging &#8230;'>Google Earth&#8217;s Issue logging &#8230;</a></li>
<li><a href='http://blog.webmapper.com.au/2005/08/13/adding-wms-overlays-to-google-earth/' rel='bookmark' title='Permanent Link: Adding WMS overlays to Google Earth'>Adding WMS overlays to Google Earth</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Seems as though <a href="http://maps.google.com/maps?f=q&#038;hl=en&#038;q=perth,+australia&#038;om=1">Google Maps</a> has finally integrated the <a href="http://www.psma.net.au/">PSMA</a> dataset. Just had a quick look and the data seems to be fairly recent.</p>
<p>I feel sorry for the <a href="http://www.zoomin.com.au">zoomin</a> guys as no doubt their target audience has all but dissappeared over night (until of course businesses read googles licencing arrangements <img src='http://blog.webmapper.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<p>Has anyone been able to get routing working? Seems as though its not accepting any kind of local address i throw at it.</p>
<p>Overall i&#8217;m not too impressed, but maybe thats because i have access to this sort of data all the time. It certainly will be interesting to see what sort of local &#8220;mashups&#8221; (god i hate that word) are created.</p>
<p>via <a href="http://www.gearthblog.com/blog/archives/2006/05/down_under_and.html">geblog</a></p>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/12/15/google-maps-to-extend-development-into-aus/' rel='bookmark' title='Permanent Link: Google Maps to extend development into Aus'>Google Maps to extend development into Aus</a></li>
<li><a href='http://blog.webmapper.com.au/2006/07/09/google-earths-issue-logging/' rel='bookmark' title='Permanent Link: Google Earth&#8217;s Issue logging &#8230;'>Google Earth&#8217;s Issue logging &#8230;</a></li>
<li><a href='http://blog.webmapper.com.au/2005/08/13/adding-wms-overlays-to-google-earth/' rel='bookmark' title='Permanent Link: Adding WMS overlays to Google Earth'>Adding WMS overlays to Google Earth</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2006/05/19/google-maps-finally-gets-aus-data/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding routing overlays to kamap</title>
		<link>http://blog.webmapper.com.au/2006/02/05/adding-routing-overlays-to-kamap/</link>
		<comments>http://blog.webmapper.com.au/2006/02/05/adding-routing-overlays-to-kamap/#comments</comments>
		<pubDate>Sun, 05 Feb 2006 04:45:36 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2006/02/05/adding-routing-overlays-to-kamap/</guid>
		<description><![CDATA[Finally, my promised follow up to my build your own routing solution article. For those who have had success massaging their data to work the pgdjikstra module, lets rock and roll. I’m writing this on the fly so hopefully by the end we can get a usable, user-friendly routing solution into Kamap.

  1. Kamap [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2006/03/21/kamap-wfs-point-overlays/' rel='bookmark' title='Permanent Link: Kamap WFS point overlays'>Kamap WFS point overlays</a></li>
<li><a href='http://blog.webmapper.com.au/2005/08/13/adding-wms-overlays-to-google-earth/' rel='bookmark' title='Permanent Link: Adding WMS overlays to Google Earth'>Adding WMS overlays to Google Earth</a></li>
<li><a href='http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/' rel='bookmark' title='Permanent Link: Build your own routing solution'>Build your own routing solution</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Finally, my promised follow up to my <a href="http://chris.narx.net/2005/12/14/build-your-own-routing-solution/">build your own routing solution</a> article. For those who have had success massaging their data to work the <a href="http://www.cartoweb.org">pgdjikstra</a> module, lets rock and roll. I’m writing this on the fly so hopefully by the end we can get a usable, user-friendly routing solution into Kamap.</p>
<p><a id="more-53"></a></p>
<p><a id="more-53"> </a><a id="more-53"><strong> 1. Kamap install.</strong></a></p>
<p><a id="more-53">  </a><a id="more-53">Grab the latest stable (or <acronym title="Concurrent Versions System">CVS</acronym> if you’re feeling lucky) release and follow the instructions to get it up an running. Paul and the rest of the crew have made this possibly the easiest frontend to get up and running in a flash, but if you do run into problems please contact </a><a href="http://lists.maptools.org/pipermail/ka-map-users/">the list</a>.</p>
<p>Ignore my setup / mess, this was an existing mapfile used for benchmarks. This is possibly what you shouldn’t have setup, but its got the road centrelines so it’ll do for our purposes.<br />
<a href="http://chris.narx.net/wp-content/uploads/2006/02/kamap11.JPG" onclick="doPopup(50);return false;" class="imagelink" title="kamap"><img src="http://chris.narx.net/wp-content/uploads/2006/02/kamap11.thumbnail.JPG" id="image50" alt="kamap" height="74" width="128" /></a></p>
<p><strong>2. Create a database handler</strong></p>
<p>Since we would like the users to be able to interface with our db, we need to create a little interface to query the roads and execute the shortest_path_as_geometry call. For the sake of simplicity, the following should give you somewhere to start. (Source: <a href="http://chris.narx.net/wp-content/uploads/2006/02/querydb.txt" id="p51">querydb.php</a>, if the output below gets munged)</p>
<p>Dont worry if the output format doesnt really make much sense at the moment, we’ll touch on this in the next step.</p>
<pre line="1" lang="php">
&lt; ?php
//SQL query
$query = "SELECT astext(the_geom) FROM shortest_path_as_geometry('roads', ".$start.", ".$end.");";
$result = pg_query($query) or die('Query failed: ' . pg_last_error()); // output
echo "n";
echo "n";
echo "	<label>Startn";
echo "  ";
while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
      foreach ($line as $col_value) {
               $col_value = str_replace("MULTILINESTRING((", " ", "$col_value");
               $col_value = str_replace("))", ", ", "$col_value");
               echo "$col_value";
      }
}
echo "n";
echo "n";
echo "n";  // Free resultset
pg_free_result($result);  // Closing connection
pg_close($dbconn);
} ?&gt;</label></pre>
<p><strong>3. Integrating PG’s kaXmlOverlay code</strong></p>
<p>PG has done some great work looking into how best to integrate vector overlays on kamap, much like google maps does. Technically, there are lots of different options, but PG’s latest code uses a mix of the wz_jsgraphics and the <acronym title="Hypertext PreProcessing">PHP</acronym> GD library.</p>
<p>This option has arguably the best cross browser support in that the route is actually rendered and thus positioned, as a <acronym title="Portable Network Graphics">PNG</acronym>/gif image. But more on that later.</p>
<p>PG has posted a demo of the capabilities at his site (<a href="http://sistel.dyndns.info/ka-map/indext.html">http://sistel.dyndns.info/ka-map/indext.html</a>).</p>
<p>You will need to download the <a href="http://sistel.dyndns.info/ka-map/kaXmlOverlay.js">kaXmlOverlay.js</a>, <a href="http://sistel.dyndns.info/ka-map/drawgeom.php.txt">drawGeom.php</a> and the <a href="http://sistel.dyndns.info/ka-map/wz_jsgraphics.js">wz_jsgraphics</a> library.</p>
<p>Edit your existing kamap index.html and add,</p>
<pre line="1" lang="javascript">
<script type="text/javascript"> 
var myCoordinates = myFixedOverlay = myMovingOverlay = myInterval = null; 
function localOnLoad() { 	
    myOnLoad(); 	
    myKaMap.registerForEvent( KAMAP_MAP_INITIALIZED, null, localMapInitialized );     
    myFixedOverlay = new kaXmlOverlay( myKaMap, 200 ); 
}  
function localMapInitialized( eventID, mapName ) { 
          myFixedOverlay.loadXml('querydb.php?ST=219102&#038;EN=183552'); 
} 
</script></pre>
<p>The code is pretty self explanatory, we simply define the path to the <acronym title="eXtensible Markup Language">XML</acronym> (querydb.php) and attach it to the map initialised handler. PG has a slightly alternative setup on his demo website, adding a refresh function to automatically refresh the <acronym title="eXtensible Markup Language">XML</acronym> doc at a set period. This is a real handy feature if you’re tracking a live GPS feed, but in our case it just adds extra overhead.</p>
<p><strong>4. Time to test</strong></p>
<p>Since the code contains a few point of failures its best to start at the beginning,</p>
<ol>
<li>Chose a start and end edge id from your postgis table and try running http://your.host/kamap/querydb.php?ST=startid&amp;EN=endid. You should get a well formatted text/xml response with the routing coordinates. If the edge ids dont exist or the geometry function did not work, you will get an error here.</li>
<li>Now you have determined that you have got the coords, time to try kamap. Load up the modified index from step #3 and tail the apache logs. Amongst all the js queries, there should be one eventual request for the querydb, and then for the drawgeom (something like drawgeom.php?gt=L&amp;st=5&amp;bp=5&amp;sc=25&amp;cl=15,1800,0..). If after 30 seconds or so you dont appear to see any overlays, strip out the exact request from your log and try to run it in isolation. eg. http://localhost/kamap/drawgeom.php?gt=L&amp;st=5&amp;bp=5&amp;… if GD is configured properly you should get an image output like below (<acronym title="Portable Network Graphics">PNG</acronym>)</li>
<p><a href="http://chris.narx.net/wp-content/uploads/2006/02/gdoutput.png" title="gdoutput.png" class="imagelink"><img src="http://chris.narx.net/wp-content/uploads/2006/02/gdoutput.thumbnail.png" alt="gdoutput.png" id="image54" height="96" width="66" /></a></p>
<li>If its still not working, there probably just a <acronym title="Uniform Resource Locator">URL</acronym> thats throwing a 404. Keep checking the logs for what its requesting just to make sure its not trying to find a file in / and not /kamap</li>
</ol>
<p><strong>5. The result</strong></p>
<p><img src="http://chris.narx.net/wp-content/uploads/2006/02/kamap2.JPG" /></p>
<p>Apologies in advance as i just didnt have time to implement a more dynamic approach such as a user entering a start/end address. I hope someone else out there has the time and the inclination to extend this stuff. The possiblities are endless.</p>
<p><strong>6. Problems and future additions?</strong></p>
<ol>
<li>Needs a better way of converting geo2pix. The existing js function has meant that potentially you could have 40 + coordinate pairs being converted (DB-&gt;XML-&gt;JS-&gt;Drawgeom-&gt;Image) to pixel space, and then passed via a <acronym title="Uniform Resource Locator">URL</acronym> parameter to drawgeom.php. <strong>Very inefficient, and can also go beyond the <acronym title="Uniform Resource Locator">URL</acronym> size limit</strong> … maybe short term the use of POST might be more suitable?</li>
<li>Line simplification. Further work needs to see how suitable the PostGIS simplify() function is. Conceptually, a function to guesstimate a suitable tolerance for the zoom level, and then retrieve the new coords would be suitable but how easy at guessing said tolerance would be interesting.</li>
<li>JS bloat. I’d prefer to move as much code as possible server side, especially for “calculations”. Being able to pass the current client params such as pixel/cell size, coords, scale etc. would mean much of the xmlOverlay.js code done by PG could be done server side, and potentially drawn in the same thread (eg. no need for a separate drawgeom.php … the initial query would pass the results direct)</li>
<li>An extension to the current querying abilities, where users can click on the map for their start and end points, and the click points would be translated into geo and then fed back into a postgis function to grab the closest road edge. This was what i wanted to do for this article, but alas theres never time.</li>
</ol>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2006/03/21/kamap-wfs-point-overlays/' rel='bookmark' title='Permanent Link: Kamap WFS point overlays'>Kamap WFS point overlays</a></li>
<li><a href='http://blog.webmapper.com.au/2005/08/13/adding-wms-overlays-to-google-earth/' rel='bookmark' title='Permanent Link: Adding WMS overlays to Google Earth'>Adding WMS overlays to Google Earth</a></li>
<li><a href='http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/' rel='bookmark' title='Permanent Link: Build your own routing solution'>Build your own routing solution</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2006/02/05/adding-routing-overlays-to-kamap/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Spatial indexing</title>
		<link>http://blog.webmapper.com.au/2006/01/12/spatial-indexing/</link>
		<comments>http://blog.webmapper.com.au/2006/01/12/spatial-indexing/#comments</comments>
		<pubDate>Thu, 12 Jan 2006 05:07:02 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2006/01/12/spatial-indexing/</guid>
		<description><![CDATA[Update: Further investigation revealed that my GiST indexes weren’t built correctly and so i have since updated the timings on the postgis results. Thanks to Sean for pointing out my boo boo.
I have noticed a bit of interest especially on PostGIS‘ new implementation of a GiST spatial index to speed up its performance. What i [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/09/01/new-orleans-satellite-imagery/' rel='bookmark' title='Permanent Link: New Orleans Satellite Imagery'>New Orleans Satellite Imagery</a></li>
<li><a href='http://blog.webmapper.com.au/2007/04/25/wfs-feature-paging-yes-please/' rel='bookmark' title='Permanent Link: WFS Feature paging &#8230; yes please'>WFS Feature paging &#8230; yes please</a></li>
<li><a href='http://blog.webmapper.com.au/2005/08/12/10-utils-to-make-opensource-gis-that-little-bit-easier/' rel='bookmark' title='Permanent Link: 10 utils to make opensource gis that little bit easier'>10 utils to make opensource gis that little bit easier</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><u><strong>Update:</strong> </u>Further investigation revealed that my GiST indexes weren’t built correctly and so i have since updated the timings on the postgis results. Thanks to Sean for pointing out my boo boo.</p>
<p>I have noticed a bit of interest especially on <a href="http://postgis.refractions.net">PostGIS</a>‘ new implementation of a GiST spatial index to speed up its performance. What i think is lacking is that there is little to no documentation on how “much” faster spatial indexing (not to be confused with attribute indexes) performs.</p>
<p>So here we go, a simple benchmark in less than 15 mins <img class="wp-smiley" alt=":)" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" /></p>
<p>First up, my datasets. For the base data, i will use the roads dataset from my previous routing article.</p>
<p>The benchmark tests in this case will be a simple, arbitrary bbox on the following datasets interfacing with Mapserver 4.6 (win32). <span style="font-style: italic" /></p>
<p><span style="font-style: italic"><em><u>Word of warning:</u></em> Please dont take these results as gospel, its merely to highlight the performance differences across the board.</span></p>
<p>FYI:</p>
<ul>
<li>All data is in CRS 4326 (WGS84)</li>
<li>The timings will be extracted using the debug output from mapserver</li>
<li>Note the number of features in each query, the first obviously not being very realistic</li>
<li>A <acronym title="Web Mapping Service">WMS</acronym> requests are for single layers only with the BBOX values below</li>
</ul>
<ol>
<li>115.69402,-32.1273,116.09642,-31.86770 <strong>Features:</strong> 57564</li>
<li>115.82508,-32.0358,115.93653,-31.97567 <strong>Features:</strong> 8408</li>
<li>115.81400,-32.0493,115.86604,-32.02131 <strong>Features:</strong> 1389</li>
<li>115.82171,-32.0405,115.84112,-32.03009 <strong>Features:</strong> 338</li>
</ol>
<table width="560" style="height: 30px">
<tr>
<td>&nbsp;</td>
<td><strong>Shapefile (no index)</strong></td>
<td><strong>Shapefile (qix index^)</strong></td>
<td><strong>PostGIS 8.1 (no index)</strong></td>
<td><strong>PostGIS 8.1 (GiST index)*</strong></td>
</tr>
<tr>
<td>1.</td>
<td style="vertical-align: top">2.938s</td>
<td style="vertical-align: top">2.201s</td>
<td style="vertical-align: top">5.297s</td>
<td style="vertical-align: top">4.275s</td>
</tr>
<tr>
<td valign="top">2.</td>
<td valign="top">0.694s</td>
<td valign="top">0.294s</td>
<td valign="top">2.812s</td>
<td valign="top">1.656s</td>
</tr>
<tr>
<td valign="top">3.</td>
<td valign="top">0.601s</td>
<td valign="top">0.140s</td>
<td valign="top">1.796s</td>
<td valign="top">0.987s</td>
</tr>
<tr>
<td valign="top">4.</td>
<td valign="top">0.219s</td>
<td valign="top">0.032s</td>
<td valign="top">0.914s</td>
<td valign="top">0.223s</td>
</tr>
</table>
<ul>
<li>^ Created with the standard quadtree sizes determine by the shptree utility</li>
<li>* Created with “CREATE INDEX roadsindex ON roadsindex USING GIST( the_geom GIST_GEOMETRY_OPS );” as per <a href="http://postgis.refractions.net/docs/ch04.html#id2900380">postgis documentation</a></li>
</ul>
<p>I think the table speaks for itself, but im a little bit cautious about drawing too many conclusions. Most people are aware that PostGIS is slower than shapefiles, but thats a given. Most users who use PostGIS are using it for other reasons (such as for its geoprocessing functions).</p>
<p>The PostGIS guys have claimed about a 10% performance loss over shapefiles. In this little test it was indeed more than this, but i have no doubts that in the hands of a more experienced postGIS expert that they could certainly narrow down the gap further.<br />
Fact of the matter is, spatial indexing is an important part of performance optimisation but should be considered with other methods such as view scale limiting, simplified symbolisation and feature generalisation. Unfortunately i dont have access to a mapserver hooked up with ArcSDE 9 or Oracle Spatial … could of made things interesting <img class="wp-smiley" alt=":)" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" /></p>
<p>Please, i make no attempts at claiming i am the master of all that is postgis and mapserver. If there is something glaringly obvious that i did not configure or did not include, please let me know and i will be happy to update the results.</p>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/09/01/new-orleans-satellite-imagery/' rel='bookmark' title='Permanent Link: New Orleans Satellite Imagery'>New Orleans Satellite Imagery</a></li>
<li><a href='http://blog.webmapper.com.au/2007/04/25/wfs-feature-paging-yes-please/' rel='bookmark' title='Permanent Link: WFS Feature paging &#8230; yes please'>WFS Feature paging &#8230; yes please</a></li>
<li><a href='http://blog.webmapper.com.au/2005/08/12/10-utils-to-make-opensource-gis-that-little-bit-easier/' rel='bookmark' title='Permanent Link: 10 utils to make opensource gis that little bit easier'>10 utils to make opensource gis that little bit easier</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2006/01/12/spatial-indexing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build your own routing solution</title>
		<link>http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/</link>
		<comments>http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/#comments</comments>
		<pubDate>Wed, 14 Dec 2005 05:08:53 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2005/12/14/build-your-own-routing-solution/</guid>
		<description><![CDATA[The following tutorial will run you through the steps to setup the core components needed for an opensource routing “solution”. So if you’re like me and have eagerly been awaiting something similar, read on.
The following guide is largely based on the tutorial found at the Cartoweb WIKI and its associated readme. Many thanks need to [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2006/02/05/adding-routing-overlays-to-kamap/' rel='bookmark' title='Permanent Link: Adding routing overlays to kamap'>Adding routing overlays to kamap</a></li>
<li><a href='http://blog.webmapper.com.au/2006/06/14/pgdijkstra-routing-performance/' rel='bookmark' title='Permanent Link: PGdijkstra Routing performance'>PGdijkstra Routing performance</a></li>
<li><a href='http://blog.webmapper.com.au/2006/04/19/note-to-self-re-postgis/' rel='bookmark' title='Permanent Link: Note to self re: postgis'>Note to self re: postgis</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The following tutorial will run you through the steps to setup the core components needed for an opensource routing “solution”. So if you’re like me and have eagerly been awaiting something similar, read on.</p>
<p>The following guide is largely based on the tutorial found at the <a href="http://www.cartoweb.org/cwiki/PgdijkstraWin32">Cartoweb WIKI</a> and its associated readme. Many thanks need to be directed at the cartoweb developers, in particular Paschain for compiling a working win32 dll and a system than can easily be built upon. Many thanks.</p>
<p>If you would like some background on the djikstra shortest path algorithm try the following resources.</p>
<p><a href="http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm">General info</a><br />
<a href="http://en.wikisource.org/wiki/Dijkstra%27s_algorithm">Various C/VB/PHP implementations</a><br />
<a href="http://www.cs.sunysb.edu/~skiena/combinatorica/animations/dijkstra.html">Step by step Animation</a></p>
<p><img width="237" height="247" src="http://chris.narx.net/wp-content/route1.JPG" /></p>
<p><a id="more-33" /></p>
<p><a id="more-33"> </a><a id="more-33">Lets get started.</a></p>
<p><a id="more-33"> </a><a id="more-33"><strong>1.</strong> Download </a><a href="http://www.postgresql.org">PostgreSQL 8.1</a> or higher.</p>
<p>The win32 installer is recommended and makes installation easy. A stable PostGIS is included in the installation of PostgreSQL so no more downloads like previous releases <img alt=":)" class="wp-smiley" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" />  I usually include all developer options in the install by habit, this shouldnt be neccessary but just make sure plpgsql language is checked when installing.</p>
<p><strong>2.</strong> Download the pgdijkstra package from <a href="http://cartoweb.org/downloads.html#pgdijkstra">cartoweb</a></p>
<p><strong>3.</strong> Extract pgdijkstra.dll into X:\..\PostgreSQL\8.1\lib</p>
<p><strong>4.</strong> Lets create a new database to hold the routing data ..</p>
<blockquote><p>createdb -U username dbname<br />
Password:<br />
CREATE DATABASE</p></blockquote>
<p><strong>5.</strong> Time to ensure plpgsql is initialised on our new db</p>
<blockquote><p>createlang plpgsql -U chris roads</p></blockquote>
<p><strong>6.</strong> Last thing we need to do is insert the new routing functions ..</p>
<blockquote><p>psql -U chris roads -f “D:\Program Files\PostgreSQL\pgdijkstra\dijkstra.sql”<br />
Password for user chris:<br />
CREATE FUNCTION<br />
CREATE FUNCTION<br />
CREATE FUNCTION<br />
CREATE FUNCTION</p></blockquote>
<blockquote><p>psql -U chris roads -f “D:\Program Files\PostgreSQL\pgdijkstra\dijkstra_postgis.sql”<br />
Password for user chris:<br />
CREATE FUNCTION<br />
CREATE FUNCTION<br />
CREATE FUNCTION<br />
CREATE FUNCTION<br />
CREATE TYPE<br />
CREATE FUNCTION<br />
CREATE FUNCTION</p></blockquote>
<p>Now assuming all the installation went A’ok then its time to start inserting our data and creating the graphs! Again, all credits go to the cartoweb guys, especially Paschain for their hard work. The following steps are reworked from the official <a href="http://www.cartoweb.org/downloads/pgdijkstra/README.txt">readme</a></p>
<p><strong>7.</strong> If you havent already converted your data into a postgis table, lets use shp2pgsql on my road dataset and create a “roads” table. Be prepared to wait a while if its a large dataset while each feature is inserted.</p>
<blockquote><p>shp2pgsql D:\roads.shp roads  > roads.sql</p></blockquote>
<p>then run the <acronym title="Structured Query Language (a database standard)">SQL</acronym> inserts into the db</p>
<blockquote><p>psql -d roadsdb -f roads.sql</p></blockquote>
<p><strong>8.</strong> If you come from a background used to using web frontends such as phpMyAdmin, id highly suggest installing <a href="http://phppgadmin.sourceforge.net/">phpPgAdmin</a>. While the diehards will scoff, it does tend to make handling the usual db functions a lot easier</p>
<p><strong>9.</strong> Almost all road datasets wont have the necessary target_id and source_id for the graph creation. Luckily there is a assign_vertex_id function to automatically generate each id from the start and end node of the line string.</p>
<p>Add 3 new columns to your roads table source_id(integer) target_id(integer) if you dont already have similar from/to node columns that you can rename. If you dont, use the following function to generate source/target id’s based on the distance given.</p>
<p>For example, using the below will group all nodes within a distance of 0.1 to the same vertex id. Obviously, depending on your units and accuracy you may wish to drop the number down to something more suitable. The smaller the unit, the longer the procedure will take <img alt=":)" class="wp-smiley" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" /></p>
<blockquote><p>SELECT assign_vertex_id(’graph2′, 0.1);</p></blockquote>
<p>Luckily my road dataset already had such from/to nodes so all was needed was a simple column rename.</p>
<table>
<tr>
<th class="data">gid</th>
<th class="data">target_id</th>
<th class="data">source_id</th>
<th class="data">astext</th>
</tr>
<tr>
<td nowrap="nowrap" class="data1">
<div align="right">535</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">178964</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">179077</div>
</td>
<td nowrap="nowrap" class="data1">MULTILINESTRING((115.929608562 -31.81452766))</td>
</tr>
<tr>
<td nowrap="nowrap" class="data2">
<div align="right">661</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">179216</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">179154</div>
</td>
<td nowrap="nowrap" class="data2">MULTILINESTRING((115.831206523 -31.87982646))</td>
</tr>
<tr>
<td nowrap="nowrap" class="data1">
<div align="right">702</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">179255</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">179213</div>
</td>
<td nowrap="nowrap" class="data1">MULTILINESTRING((115.868336883 -31.87188829))</td>
</tr>
<tr>
<td nowrap="nowrap" class="data2">
<div align="right">789</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">179329</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">179333</div>
</td>
<td nowrap="nowrap" class="data2">MULTILINESTRING((115.895629241 -31.8718535256))</td>
</tr>
</table>
<p><strong>10.</strong> Now we are ready to begin generating the graph edges and vertices.</p>
<blockquote><p>SELECT create_graph_tables(’roads’, ‘int4′);</p></blockquote>
<p>This procedure will create 2 new tables, roads_vertices and roads_edges. If your source and target id’s are not using int4 as a type, you will need to modify the <acronym title="Structured Query Language (a database standard)">SQL</acronym> procedure and remove the int4 dependancy. Otherwise, cross your fingers and wait for the tables to be populated.</p>
<table>
<tr>
<th class="data">id</th>
<th class="data">source</th>
<th class="data">target</th>
<th class="data">cost</th>
<th class="data">reverse_cost</th>
</tr>
<tr>
<td nowrap="nowrap" class="data1">
<div align="right">1</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">1274</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">1275</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right"><em>NULL</em></div>
</td>
<td nowrap="nowrap" class="data1"><em>NULL</em></td>
</tr>
<tr>
<td nowrap="nowrap" class="data2">
<div align="right">2</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">1276</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">1277</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right"><em>NULL</em></div>
</td>
<td nowrap="nowrap" class="data2"><em>NULL</em></td>
</tr>
<tr>
<td nowrap="nowrap" class="data1">
<div align="right">3</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">1278</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">1279</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right"><em>NULL</em></div>
</td>
<td nowrap="nowrap" class="data1"><em>NULL</em></td>
</tr>
</table>
<p><strong>11.</strong> As you can see we need to populating the cost weighting for each edge. There is a update_cost_from_distance function by default that simply calculates the length of the edge and uses this as the weight. Obviously if you would like to formulate a more complex algorithm for your weights such as using distance, road type, speed etc. then you will need to edit this function. Its easy to do so feel free to have a play.</p>
<p>Lets use plain distance for now,</p>
<blockquote><p>SELECT update_cost_from_distance(’roads’);</p></blockquote>
<table>
<tr>
<th class="data">id</th>
<th class="data">source</th>
<th class="data">target</th>
<th class="data">cost</th>
<th class="data">reverse_cost</th>
</tr>
<tr>
<td nowrap="nowrap" class="data1">
<div align="right">1</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">1274</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">1275</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">0.000655682025166796</div>
</td>
<td nowrap="nowrap" class="data1"><em>NULL</em></td>
</tr>
<tr>
<td nowrap="nowrap" class="data2">
<div align="right">2</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">1276</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">1277</div>
</td>
<td nowrap="nowrap" class="data2">
<div align="right">0.00270400042483912</div>
</td>
<td nowrap="nowrap" class="data2"><em>NULL</em></td>
</tr>
<tr>
<td nowrap="nowrap" class="data1">
<div align="right">3</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">1278</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">1279</div>
</td>
<td nowrap="nowrap" class="data1">
<div align="right">0.00684668815982494</div>
</td>
<td nowrap="nowrap" class="data1"><em>NULL</em></td>
</tr>
</table>
<p>12. We’re pretty much done. Time to generate a shortest path! Using shortest_path_as_geometry we can pass the start and end points for our route. The function expects the node target/source id’s from the original roads table. So lets manually select a couple and try running it.</p>
<blockquote><p>SELECT gid, astext(the_geom) FROM shortest_path_as_geometry(’roads’, 179551, 179681);</p></blockquote>
<p>You should now be looking at a list of MULTILINESTRING objects which make up the shortest path from your start to end vertex.</p>
<p><strong>13.</strong> Visualising your shortest path is the next logical step. There are a number of ways doing this, such as passing the geometry to a vrml/javascript function or rendering it as an image. Luckily Paschain has included an easy way to insert the static path inside a Mapserver layer.</p>
<pre>LAYER NAME "route" TYPE LINE STATUS DEFAULT CONNECTIONTYPE postgis CONNECTION "host=localhost dbname=roads user=chris password=pass " DATA "the_geom from (SELECT the_geom, gid from shortest_path_as_geometry('roads', 219102, 183552)) as route using unique gid using srid=-1" TEMPLATE "t" CLASS NAME "0" STYLE SYMBOL "circle" SIZE 7 COLOR 255 255 0 END END END</pre>
<p><em>Please note</em> that this method is very inefficient as each map refresh will recalculate the route and so putting a lot of unnecessary load on the database. Only use this a proof of concept for now <img alt=":)" class="wp-smiley" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" /></p>
<p>Lets compare the “shortest path” with a common driving directions site, <a href="http://www.whereis.com.au">whereis.com.au</a>. As you can see, the route is different purely because of our simple algorithm to generate the weights.</p>
<p><img width="209" height="217" src="http://chris.narx.net/wp-content/route1.JPG" /></p>
<p><img width="203" height="231" src="http://chris.narx.net/wp-content/route2.jpg" /></p>
<p>I plan to release some at least two more articles that build on this introduction.The first will investigate how to tweak the weighting algorithm to more closely match the commercial routing option and the second will look at implementing a more dynamic, user friendly javascript option built into <a href="http://www.maptools.org/kamap">Ka-Map</a>.</p>
<p>Stay tuned, hope i havent put too many of you to sleep <img alt=":)" class="wp-smiley" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" /></p>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2006/02/05/adding-routing-overlays-to-kamap/' rel='bookmark' title='Permanent Link: Adding routing overlays to kamap'>Adding routing overlays to kamap</a></li>
<li><a href='http://blog.webmapper.com.au/2006/06/14/pgdijkstra-routing-performance/' rel='bookmark' title='Permanent Link: PGdijkstra Routing performance'>PGdijkstra Routing performance</a></li>
<li><a href='http://blog.webmapper.com.au/2006/04/19/note-to-self-re-postgis/' rel='bookmark' title='Permanent Link: Note to self re: postgis'>Note to self re: postgis</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Opensource routing tools</title>
		<link>http://blog.webmapper.com.au/2005/11/11/opensource-routing-tools/</link>
		<comments>http://blog.webmapper.com.au/2005/11/11/opensource-routing-tools/#comments</comments>
		<pubDate>Fri, 11 Nov 2005 04:59:42 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2005/11/11/opensource-routing-tools/</guid>
		<description><![CDATA[I have long been interested in routing technology and often wondered why there seemed to be nothing freely available on the web. After a lot of digging around i stumbled upon two potential options, Geotools‘ routing module and PGDijkstra, an extension that sits on top of PostGIS.
To save anyone else out there some time in [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/08/12/10-utils-to-make-opensource-gis-that-little-bit-easier/' rel='bookmark' title='Permanent Link: 10 utils to make opensource gis that little bit easier'>10 utils to make opensource gis that little bit easier</a></li>
<li><a href='http://blog.webmapper.com.au/2005/08/04/dmsolutions-done-it-again/' rel='bookmark' title='Permanent Link: DMSolutions done it again'>DMSolutions done it again</a></li>
<li><a href='http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/' rel='bookmark' title='Permanent Link: Build your own routing solution'>Build your own routing solution</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have long been interested in routing technology and often wondered why there seemed to be nothing freely available on the web. After a lot of digging around i stumbled upon two potential options, <a href="http://www.geotools.org">Geotools</a>‘ routing module and <a href="http://www.cartoweb.org/contribs.html#pgdijkstra">PGDijkstra</a>, an extension that sits on top of <a href="http://postgis.refractions.net">PostGIS</a>.</p>
<p>To save anyone else out there some time in finding this same info, i have attached the relevant info to the bottom of the post.</p>
<p>I am extremely interested in the work Paschain has done on the PGDijkstra module which he successfully uses in camp2camp’s <acronym title="GNU General Public License">GPL</acronym> <a href="http://www.cartoweb.org">CartoWeb</a> frontend (see <a href="http://www.cartoweb.org/demos/demoPlugins.php">this demo</a> for an example). Unfortunately Paschain has only deployed it into a *nix environment and i am yet to have any luck building the module from source in win32. Any diehard PostGIS experts reading this, i implore you to have a <a href="http://www.cartoweb.org/downloads/pgdijkstra/README.txt">read of the docs</a> and let me know if you have had any success.</p>
<p>If there are any other solutions out there that i missed, please drop me a line.</p>
<p><strong><br />
Geotools routing module</strong></p>
<p>I have not put a great deal of time investigating this module as it has a big limitation of having to maintain the graph in memory. I wanted it to run on a quite large road dataset and so storing the edges in memory wasn’t really an option.</p>
<p>If you’re just generally interested, check out the <a href="http://lists.maptools.org/pipermail/cartoweb-users/2005-August/000134.html">following thread</a> where the author Yves describes how to enable the module for the demo.</p>
<blockquote><p>Yves Bolognini wrote:<br />
I’m the one who wrote the initial GeoTools routing module. This was<br />
actually a test module as the idea was to implement routing in PostGIS.</p>
<p>If you still want to use GeoTools routing, you’ll first need to install<br />
the <acronym title="Hypertext PreProcessing">PHP</acronym>/Java Bridge and GeoTools 2.1.x:</p>
<p>http://www.php.net/manual/en/ref.java.php</p>
<p>http://www.geotools.org/Downloads</p>
<p>Then you can activate Routing plugin on test_project client:</p>
<p>/projects/test_project/client_conf/client.ini<br />
loadPlugins = …, routing</p>
<p>…and on server:</p>
<p>/projects/test_project/server_conf/projectmap/projectmap.ini<br />
mapInfo.loadPlugins = …, routing, projectRouting</p>
<p>Layers used for routing in this demo are more_points and more_lines.</p></blockquote>
<p>I haven’t tried the steps mentioned above, so attempt at your own risk ! <img alt=":)" class="wp-smiley" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" /></p>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/08/12/10-utils-to-make-opensource-gis-that-little-bit-easier/' rel='bookmark' title='Permanent Link: 10 utils to make opensource gis that little bit easier'>10 utils to make opensource gis that little bit easier</a></li>
<li><a href='http://blog.webmapper.com.au/2005/08/04/dmsolutions-done-it-again/' rel='bookmark' title='Permanent Link: DMSolutions done it again'>DMSolutions done it again</a></li>
<li><a href='http://blog.webmapper.com.au/2005/12/14/build-your-own-routing-solution/' rel='bookmark' title='Permanent Link: Build your own routing solution'>Build your own routing solution</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2005/11/11/opensource-routing-tools/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New Orleans Satellite Imagery</title>
		<link>http://blog.webmapper.com.au/2005/09/01/new-orleans-satellite-imagery/</link>
		<comments>http://blog.webmapper.com.au/2005/09/01/new-orleans-satellite-imagery/#comments</comments>
		<pubDate>Thu, 01 Sep 2005 05:07:51 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2005/09/01/new-orleans-satellite-imagery/</guid>
		<description><![CDATA[Update: Further investigation revealed that my GiST indexes weren’t built correctly and so i have since updated the timings on the postgis results. Thanks to Sean for pointing out my boo boo.
I have noticed a bit of interest especially on PostGIS‘ new implementation of a GiST spatial index to speed up its performance. What i [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2006/01/12/spatial-indexing/' rel='bookmark' title='Permanent Link: Spatial indexing'>Spatial indexing</a></li>
<li><a href='http://blog.webmapper.com.au/2007/04/25/wfs-feature-paging-yes-please/' rel='bookmark' title='Permanent Link: WFS Feature paging &#8230; yes please'>WFS Feature paging &#8230; yes please</a></li>
<li><a href='http://blog.webmapper.com.au/2007/02/02/how-to-not-setup-an-online-imagery-shop/' rel='bookmark' title='Permanent Link: How to not setup an online imagery shop'>How to not setup an online imagery shop</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><u><strong>Update:</strong> </u>Further investigation revealed that my GiST indexes weren’t built correctly and so i have since updated the timings on the postgis results. Thanks to Sean for pointing out my boo boo.</p>
<p>I have noticed a bit of interest especially on <a href="http://postgis.refractions.net">PostGIS</a>‘ new implementation of a GiST spatial index to speed up its performance. What i think is lacking is that there is little to no documentation on how “much” faster spatial indexing (not to be confused with attribute indexes) performs.</p>
<p>So here we go, a simple benchmark in less than 15 mins <img alt=":)" class="wp-smiley" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" /></p>
<p>First up, my datasets. For the base data, i will use the roads dataset from my previous routing article.</p>
<p>The benchmark tests in this case will be a simple, arbitrary bbox on the following datasets interfacing with Mapserver 4.6 (win32). <span style="font-style: italic" /></p>
<p><span style="font-style: italic"><em><u>Word of warning:</u></em> Please dont take these results as gospel, its merely to highlight the performance differences across the board.</span></p>
<p>FYI:</p>
<ul>
<li>All data is in CRS 4326 (WGS84)</li>
<li>The timings will be extracted using the debug output from mapserver</li>
<li>Note the number of features in each query, the first obviously not being very realistic</li>
<li>A <acronym title="Web Mapping Service">WMS</acronym> requests are for single layers only with the BBOX values below</li>
</ul>
<ol>
<li>115.69402,-32.1273,116.09642,-31.86770 <strong>Features:</strong> 57564</li>
<li>115.82508,-32.0358,115.93653,-31.97567 <strong>Features:</strong> 8408</li>
<li>115.81400,-32.0493,115.86604,-32.02131 <strong>Features:</strong> 1389</li>
<li>115.82171,-32.0405,115.84112,-32.03009 <strong>Features:</strong> 338</li>
</ol>
<table width="560" style="height: 30px">
<tr>
<td></td>
<td><strong>Shapefile (no index)</strong></td>
<td><strong>Shapefile (qix index^)</strong></td>
<td><strong>PostGIS 8.1 (no index)</strong></td>
<td><strong>PostGIS 8.1 (GiST index)*</strong></td>
</tr>
<tr>
<td>1.</td>
<td style="vertical-align: top">2.938s</td>
<td style="vertical-align: top">2.201s</td>
<td style="vertical-align: top">5.297s</td>
<td style="vertical-align: top">4.275s</td>
</tr>
<tr>
<td valign="top">2.</td>
<td valign="top">0.694s</td>
<td valign="top">0.294s</td>
<td valign="top">2.812s</td>
<td valign="top">1.656s</td>
</tr>
<tr>
<td valign="top">3.</td>
<td valign="top">0.601s</td>
<td valign="top">0.140s</td>
<td valign="top">1.796s</td>
<td valign="top">0.987s</td>
</tr>
<tr>
<td valign="top">4.</td>
<td valign="top">0.219s</td>
<td valign="top">0.032s</td>
<td valign="top">0.914s</td>
<td valign="top">0.223s</td>
</tr>
</table>
<ul>
<li>^ Created with the standard quadtree sizes determine by the shptree utility</li>
<li>* Created with “CREATE INDEX roadsindex ON roadsindex USING GIST( the_geom GIST_GEOMETRY_OPS );” as per <a href="http://postgis.refractions.net/docs/ch04.html#id2900380">postgis documentation</a></li>
</ul>
<p>I think the table speaks for itself, but im a little bit cautious about drawing too many conclusions. Most people are aware that PostGIS is slower than shapefiles, but thats a given. Most users who use PostGIS are using it for other reasons (such as for its geoprocessing functions).</p>
<p>The PostGIS guys have claimed about a 10% performance loss over shapefiles. In this little test it was indeed more than this, but i have no doubts that in the hands of a more experienced postGIS expert that they could certainly narrow down the gap further.<br />
Fact of the matter is, spatial indexing is an important part of performance optimisation but should be considered with other methods such as view scale limiting, simplified symbolisation and feature generalisation. Unfortunately i dont have access to a mapserver hooked up with ArcSDE 9 or Oracle Spatial … could of made things interesting <img alt=":)" class="wp-smiley" src="http://chris.narx.net/wp-includes/images/smilies/icon_smile.gif" /></p>
<p>Please, i make no attempts at claiming i am the master of all that is postgis and mapserver. If there is something glaringly obvious that i did not configure or did not include, please let me know and i will be happy to update the results.</p>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2006/01/12/spatial-indexing/' rel='bookmark' title='Permanent Link: Spatial indexing'>Spatial indexing</a></li>
<li><a href='http://blog.webmapper.com.au/2007/04/25/wfs-feature-paging-yes-please/' rel='bookmark' title='Permanent Link: WFS Feature paging &#8230; yes please'>WFS Feature paging &#8230; yes please</a></li>
<li><a href='http://blog.webmapper.com.au/2007/02/02/how-to-not-setup-an-online-imagery-shop/' rel='bookmark' title='Permanent Link: How to not setup an online imagery shop'>How to not setup an online imagery shop</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2005/09/01/new-orleans-satellite-imagery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The need for web based GIS to evolve</title>
		<link>http://blog.webmapper.com.au/2005/08/16/the-need-for-web-based-gis-to-evolve/</link>
		<comments>http://blog.webmapper.com.au/2005/08/16/the-need-for-web-based-gis-to-evolve/#comments</comments>
		<pubDate>Tue, 16 Aug 2005 04:28:29 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2005/08/16/the-need-for-web-based-gis-to-evolve/</guid>
		<description><![CDATA[With all the hype surrounding google/yahoo/msn maps, it has certainly raised the profile of web mapping on the net. No longer do users need to click and wait, they now have sexy looking, responsive interfaces which are actually simple to use. So where does that leave the rest of our clunky, slow, complex web GIS [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/08/13/ka-map-makes-it-to-xmlcom/' rel='bookmark' title='Permanent Link: Ka-Map makes it to xml.com'>Ka-Map makes it to xml.com</a></li>
<li><a href='http://blog.webmapper.com.au/2005/10/16/securing-your-geometry-in-arcims/' rel='bookmark' title='Permanent Link: Securing your geometry in Arcims'>Securing your geometry in Arcims</a></li>
<li><a href='http://blog.webmapper.com.au/2007/04/07/taking-it-to-the-man/' rel='bookmark' title='Permanent Link: Taking it to &#8220;the man&#8221;'>Taking it to &#8220;the man&#8221;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>With all the hype surrounding google/yahoo/msn maps, it has certainly raised the profile of web mapping on the net. No longer do users need to click and wait, they now have sexy looking, <strong>responsive</strong> interfaces which are actually simple to use. So where does that leave the rest of our clunky, slow, complex web <acronym title="Geographic Information Systems">GIS</acronym> systems?</p>
<p>I have been pondering this thought for quite a while and i think its really a direction <acronym title="Geographic Information Systems">GIS</acronym> needs to look at moving should the situation suit the use of “non-live data”.</p>
<p>We have a tendancy to expect users will always need the most up to date data available, all the time. This of course suits particular situations but i think most will agree that more often than not, static data does the job just as well. Highlighting the needs and expectations of the users using the <acronym title="Geographic Information Systems">GIS</acronym> is the key; assume nothing.</p>
<p>The best way to illustrate the differences in architecture between the new and the old, lets take the standard road map application. It has the standard functionality of zoom and pan, direction routing, search and geocoding.</p>
<p>In the existing <acronym title="Geographic Information Systems">GIS</acronym> mindset, this application would be built using an application server referencing the spatial and attribute databases. Every map zoom, pan and search the users submit will need to be sent in the usual REQUEST <-> RESPONSE communication. It is this communication which effectively kills the responsiveness of any web application using this ‘click and wait’ method. Not only does the user need to send a sometimes detailed request, the server must then</p>
<ul>
<li>parse the request</li>
<li>execute its procedures and queries</li>
<li>reference the database(s)</li>
<li>perform any spatial operations</li>
<li>Retrieve the data</li>
<li>Perform any reprojections</li>
<li>Run cartographic formatting</li>
<li>Create the image</li>
<li>Send the response</li>
</ul>
<p>Sound a bit too complex for someone just wanting to pan around the map? Thats because it is.</p>
<p>Fast forward to the past year and all the new players have ditched the old method in favour of visually appealing, quick and responsive interfaces. The one key difference? Architecture.<br />
<a id="more-19"><br />
To give a bit of background, applications such as google maps buy their street data and imagery off a variety of suppliers. This data as soon as it is cut off to google is static. They then generate about 7tb of image tiles and then consume these inside their <acronym title="Asynchronous Java and XML">AJAX</acronym> (Asynchronous Javascript and <acronym title="eXtensible Markup Language">XML</acronym>) frontend. The result? Asynchronous movement.</a></p>
<p><a id="more-19"> </a><a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29">source:</a><br />
<em><br />
</em></p>
<blockquote><p><em><acronym title="Asynchronous Java and XML">AJAX</acronym> applications can send requests to the web server to retrieve only the data that is needed, usually using <acronym title="Simple Object Access Protocol">SOAP</acronym> or some other <acronym title="eXtensible Markup Language">XML</acronym>-based web services dialect, and using JavaScript in the client to process the web server response. The result is more responsive applications, since the amount of data interchanged between the web browser and web server is vastly reduced. Web server processing time is also saved, since a lot of this is done on the computer from which the request came.</em></p></blockquote>
<p>In this new architecture, there is still REQUEST<->RESPONSE communication, but the request is made asynchronously (ie. no click and wait) and the request is a simple image retrieval. This simplifies the application in that it only needs to,</p>
<ul>
<li>Parse the request</li>
<li>Retrieve the image</li>
<li>Send the result</li>
</ul>
<p>In Australian terms, this is just another way to “skin the cat” (doing the same thing two different ways). There are obvious positives and negatives for both implementations, but in the end its a battle between finding a balance between usability/responsiveness and the data driven applications themselves.</p>
<p>There is a real need out there to realise our shortcomings in the existing implementation and move forward in making these data driven apps more “user friendly”. Think about the following situation and the practicality of using an <acronym title="Asynchronous Java and XML">AJAX</acronym> solution,</p>
<p>Manually performing a cadastral parcel selection,</p>
<ul>
<li>Current</li>
<ul>
<li>The user sends the active layer and the click coordinates</li>
<li>The server parses the request and performs the spatial intersect on the layer</li>
<li>It then highlights the parcel and <strong>draws the remaining 300 non-selected parcels as an image</strong></li>
<li>Server returns the image</li>
</ul>
<li><acronym title="Asynchronous Java and XML">AJAX</acronym> implementation</li>
<ul>
<li>The user sends the active layer and the click coordinates</li>
<li>The server parses the request and performs the spatial intersect on the layer</li>
<li>It then extracts either, the coordinates as GML,  or an image with only the selected parcel</li>
<li>Server returns the image or GML</li>
<li>Client processes the response and <strong>overlays the new image/GML over the existing image</strong></li>
</ul>
</ul>
<p>Sound familiar? This example can be modified to handle alot of other common situations. If someone was to calculate the statistics, im sure <acronym title="Geographic Information Systems">GIS</acronym> systems on general would create 70% of redundant images due to poorly implemented cache systems, or situations where the whole map is regenerated just to add a single point (or even worse, regenerated when nothing has changed).</p>
<p>So what do we do? Well, unfortunately a lot of the implementation lies with the application developers (Arcims/Mapserver/Geomedia/Geoserver devs, id love to hear your thoughts). The ability to perform a select, for example, without actually retrieving an image of the entire extents is still unavailable on any application as far as i’m aware. If we all just took one step back and looked at our implementations it would be obvious that we do the simplest things (drawing map extents), very very poorly.</p>
<p>My final open question … Do we really need live cadastral layers? If yes, are we really talking about the spatial data, or just the attributes attached to it?</p>
<p><em><a href="http://ka-map.maptools.org">Ka-map</a> is one such implementation of an asynchronous mapserver client. It is capable of generating mapserver tiled images on the fly or from its cache and can easily be scripted to perform “live” attribute retrieval for interrogating the “static” tiled layers.</em></p>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/08/13/ka-map-makes-it-to-xmlcom/' rel='bookmark' title='Permanent Link: Ka-Map makes it to xml.com'>Ka-Map makes it to xml.com</a></li>
<li><a href='http://blog.webmapper.com.au/2005/10/16/securing-your-geometry-in-arcims/' rel='bookmark' title='Permanent Link: Securing your geometry in Arcims'>Securing your geometry in Arcims</a></li>
<li><a href='http://blog.webmapper.com.au/2007/04/07/taking-it-to-the-man/' rel='bookmark' title='Permanent Link: Taking it to &#8220;the man&#8221;'>Taking it to &#8220;the man&#8221;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2005/08/16/the-need-for-web-based-gis-to-evolve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DMSolutions done it again</title>
		<link>http://blog.webmapper.com.au/2005/08/04/dmsolutions-done-it-again/</link>
		<comments>http://blog.webmapper.com.au/2005/08/04/dmsolutions-done-it-again/#comments</comments>
		<pubDate>Thu, 04 Aug 2005 04:50:44 +0000</pubDate>
		<dc:creator>Chris Tweedie</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://chris.narx.net/2005/08/04/dmsolutions-done-it-again/</guid>
		<description><![CDATA[Paul Spencer at DMSolutions has posted their latest demonstration of KA-Map which uses AJAX-esque technology to transform mapserver output into a tiled format similar to maps@google but with a lot more features.
Check out the demo site here. It is without a doubt the best demo i have seen showcasing Ka-Map and mapserver’s new WMS support [...]


Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/11/11/opensource-routing-tools/' rel='bookmark' title='Permanent Link: Opensource routing tools'>Opensource routing tools</a></li>
<li><a href='http://blog.webmapper.com.au/2005/09/20/creating-3d-views-from-contours/' rel='bookmark' title='Permanent Link: Creating 3d views from contours'>Creating 3d views from contours</a></li>
<li><a href='http://blog.webmapper.com.au/2006/06/25/geoar-openlazlo-wmswfs-client/' rel='bookmark' title='Permanent Link: GeoAr OpenLazlo WMS/WFS Client'>GeoAr OpenLazlo WMS/WFS Client</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Paul Spencer at <a href="http://www.dmsolutions.ca/">DMSolutions</a> has posted their latest demonstration of <a href="http://kamap.maptools.org">KA-Map</a> which uses <acronym title="Asynchronous Java and XML">AJAX</acronym>-esque technology to transform mapserver output into a tiled format similar to <a href="http://maps.google.com">maps@google</a> but with a lot more features.</p>
<p>Check out the demo site <a href="http://iboattrack02.mapsherpa.com/2005MH/index.html">here</a>. It is without a doubt the best demo i have seen showcasing Ka-Map and mapserver’s new <acronym title="Web Mapping Service">WMS</acronym> support for a time attribute. Excellent stuff … just make sure you press play !</p>
<p>ps. In a somewhat related line, anyone know of any projects working on an opensource routing solution? Let me know</p>


<p>Related posts:<ol><li><a href='http://blog.webmapper.com.au/2005/11/11/opensource-routing-tools/' rel='bookmark' title='Permanent Link: Opensource routing tools'>Opensource routing tools</a></li>
<li><a href='http://blog.webmapper.com.au/2005/09/20/creating-3d-views-from-contours/' rel='bookmark' title='Permanent Link: Creating 3d views from contours'>Creating 3d views from contours</a></li>
<li><a href='http://blog.webmapper.com.au/2006/06/25/geoar-openlazlo-wmswfs-client/' rel='bookmark' title='Permanent Link: GeoAr OpenLazlo WMS/WFS Client'>GeoAr OpenLazlo WMS/WFS Client</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.webmapper.com.au/2005/08/04/dmsolutions-done-it-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
