<?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>spatial nodes &#187; animation</title>
	<atom:link href="http://blog.minst.net/tag/animation/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.minst.net</link>
	<description>Thoughts of a lost soul</description>
	<lastBuildDate>Mon, 23 Jan 2012 16:33:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Visualizing gps tracks with Processing</title>
		<link>http://blog.minst.net/2009/12/21/visualizing-gps-tracks-with-processing</link>
		<comments>http://blog.minst.net/2009/12/21/visualizing-gps-tracks-with-processing#comments</comments>
		<pubDate>Mon, 21 Dec 2009 15:04:21 +0000</pubDate>
		<dc:creator>stvn</dc:creator>
				<category><![CDATA[GIS]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://blog.minst.net/?p=198</guid>
		<description><![CDATA[At work we got an i-gotU (a GPS logger) as a Christmas present. To show what one can do with it I decided to ask a few people to use their i-gotU to record their travels for two weeks. This resulted in over 42000 locations done by 8 different persons. Each person got his/her own [...]]]></description>
			<content:encoded><![CDATA[<p>At work we got an <a href="http://www.i-gotu.com/">i-gotU</a> (a GPS logger) as a Christmas present. To show what one can do with it I decided to ask a few people to use their i-gotU to record their travels for two weeks. This resulted in over 42000 locations done by 8 different persons. Each person got his/her own color in the visualization to be able to see when people were near one another. Since the office is in Amsterdam and most people live in (different parts of) Amsterdam you can quickly see the contours of Amsterdam&#8217;s city-plan appear. Also interestingly is to note that people have their own specific areas where they spend most of their time.</p>
<p><a href="http://blog.minst.net/2009/12/21/visualizing-gps-tracks-with-processing"><em>Click here to view the embedded video.</em></a></p>
<p><span id="more-198"></span></p>
<p>To visualize these tracks I used <a href="http://processing.org/">Processing</a>, &#8216;an open source programming language and environment for people who want to program images, animation, and interactions.&#8217;  There are lots of plugins to read different data formats, an interesting one for this project is the <a href="http://processing.org/hacks/hacks:gpx">gpx library</a>. The plan was to render the tracks of each person in a different color, tracks which happened at the same time should be drawn at the same time. This way you can see which people are at the same time at the same location. Each track would fade out in time, leaving a thin line for past tracks.</p>
<p>To do this on a track-basis however turned out to be quite difficult for my limited knowledge of Processing and the time I had available. So instead of using the gpx module I created a flat table with all locations sorted by time. Each row of the table contains lon,lat,color-id,time. The program iterates through all 42000+ rows and draws the locations as a dot. The size of the dot depends on how &#8216;old&#8217; the point is. The last 200 points are drawn with a diminishing size, creating the worm-like effect in the animation. Note that it doesn&#8217;t take into account the actual time between points, just if it is next in line.</p>
<p>A few tweaks were added: Holland in unprojected lat-lon looks odd to dutch people, so I implemented a simple projection library to reproject the points to a semi-RD (dutch projection). Also I wanted to dynamically zoom to the action (not everything was happening in Amsterdam). I did this by calculating the minimum and maximum X and Y for the last 200 points. I wanted the location of our office building to be in view all the time, to provide a point of reference.</p>
<p>The source code can be found <a href="http://blog.minst.net/wp-content/uploads/2009/12/drawing.zip">here </a>if you are really interested. There are three files: Table.pde as written by Ben Fry for his book Visualizing Data, Soprojection.pde, written by <a href="http://blog.geodeo.nl/">Steven Fruijtier</a> at my request and Drawing.pde is hacked together by me. This is a very crude and brute-force approach to render a series of tracks, so please use it with care. Since it needs to recalculate each point for each frame it tends to become slower as it advances through the table.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.minst.net/2009/12/21/visualizing-gps-tracks-with-processing/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

