<?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>Scanning Pages</title>
	<atom:link href="http://scanningpages.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://scanningpages.wordpress.com</link>
	<description>Steve Singer&#039;s blog on databases, GIS and other software like things</description>
	<lastBuildDate>Thu, 09 May 2013 17:05:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='scanningpages.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Scanning Pages</title>
		<link>http://scanningpages.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://scanningpages.wordpress.com/osd.xml" title="Scanning Pages" />
	<atom:link rel='hub' href='http://scanningpages.wordpress.com/?pushpress=hub'/>
		<item>
		<title>What I Learned in Math School</title>
		<link>http://scanningpages.wordpress.com/2013/04/21/what-i-learned-in-math-school/</link>
		<comments>http://scanningpages.wordpress.com/2013/04/21/what-i-learned-in-math-school/#comments</comments>
		<pubDate>Sun, 21 Apr 2013 19:53:56 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[computer-science]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[science eduation]]></category>
		<category><![CDATA[uwaterloo]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=613</guid>
		<description><![CDATA[E.O Wilson recently published an article in the Wall Street Journal where he argues Scientists don&#8217;t need math skills. He feels that many potential scientists are being turned away from science because they find math hard. Wilson goes onto argue that scientists in many fields don&#8217;t really need much math. I&#8217;m not going to address [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=613&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://scanningpages.files.wordpress.com/2013/04/symbol.png"><img src="http://scanningpages.files.wordpress.com/2013/04/symbol.png?w=614" alt="symbol"   class="aligncenter size-full wp-image-620" /></a></p>
<p>E.O Wilson recently published an article in the Wall Street Journal where he argues <a href="http://online.wsj.com/article/SB10001424127887323611604578398943650327184.html">Scientists don&#8217;t need math skills</a>. He feels that many potential  scientists are being turned away from science because they find math hard.  Wilson goes onto argue that scientists in many fields don&#8217;t really need much math. I&#8217;m not going to address Wilson&#8217;s argument directly but instead talk about what I learned about math in school.</p>
<p><span id="more-613"></span></p>
<p>There is a degree hanging on my mother&#8217;s wall with my name on it that says &#8220;Bachelor of Mathematics in Computer Science&#8221;.   In high school I didn&#8217;t particularly enjoy math and I can&#8217;t say I was all that good at it.  I wanted to go into computers and Waterloo had a reputation for having one of the best computer science programs in the country.  At the time getting a computer science degree from Waterloo meant enrolling in the faculty of mathematics and getting a bachelor of math.  I understand you can now do computer science at Waterloo without getting a B. Math but that wasn&#8217;t the case in my day.</p>
<p>Getting into any respected computer science program required good marks in high school math. High math marks weren&#8217;t coming naturally to me so I spent long hard hours working on getting acceptable math marks.  <strong>Lesson one</strong>:  If you get put in long hours  learning something your not good at, and don&#8217;t enjoy, you can often get good enough at it.  Other people learn this playing a musical instrument or through sports but the important point is learning how effort and determination can often make up for lack of talent. Even though you might never get as good as someone who is naturally talented you can often get good enough.  Hard problems often require hard work and it is important to learn this.</p>
<p>The University of Waterloo Computer Science B.Math program gave students a broad exposure to most branches of mathematics in addition to a much deeper treatment of computer science.  The math courses I took in my first two years were the same math courses any other (pure math, applied math etc..) math major took. As a first year math major I discovered that I didn&#8217;t know very much about math.   First year mathies at Waterloo took a classical algebra course where we were taught how to prove things with mathematical rigour.  By the end of the first week I was totally confused.   High school math for me was about the mechanical manipulation of numbers we weren&#8217;t taught how to prove things. I would spend much of the next four years writing mathematical proofs.  One of the early proofs in the classical algebra course was to show when a linear Diophantine equation had a solution.  Until I dug-out my old textbook ago I had forgotten what a Diophantine equation was but looking at the textbook I can now clearly see what we were actually being taught in first year. The point of wasn&#8217;t to learn how to solve a Diophantine equation it was to learn how to go about proving things.  <strong>Lesson Two</strong>: To show something mathematically you break the problem down into small pieces and solve each component.  You build up your solution by first proving the parts (theorems and lemmas) that you need for your overall solution.</p>
<p>One of the reasons why teaching logical reasoning through mathematics works so well is because math is a very precise language.  <strong>Lesson Three</strong>:  When solving a problem, using precise language is important.  Precise language allows me to be very specific about what I am talking about which allows me to say things that are verifiable. I can get away with saying almost anything using general non-specific language because I can phrase things with such generalizations such that I am not really saying anything at all.  The language of generalizations works great for politicians and blog authors but doesn&#8217;t actually contribute much to coming up with real solutions to scientific problems.</p>
<p>A common type of question on my math assignments and exams was to show that a particular mathematical statement was true. In this type of question you need to provide an answer that walks the reader from a starting point to a known conclusion. I wasn&#8217;t being asked to find the answer to a question but to explain why the answer they have given me is true. Sometimes I couldn&#8217;t figure out all of the steps to go from statement A to statement B but I knew it was possible and required since I could work backwards from the result I was trying to show.  One approach I tried (more than once) was to wave my hands and say A=B (as if by magic) and move on with the rest of the solution.   The markers almost always called me out on this and put &#8220;Why&#8221; in big red letters next to a -1.  I knew A was equal to B and the markers knew A was equal to B but knowing something is true doesn&#8217;t count for much in math if you can&#8217;t explain why it is true.  <strong>Lesson four:</Strong> If you don&#8217;t know the reasons behind something and you try to fake or hand-wave your way through you are going to be called out on it even if your conclusion is correct.  This lesson is very important for scientists because science is about explaining the reasons behind the things we observe in the real world.  Science isn&#8217;t about calculating how long a ball dropped from a 100m high building will take to hit the ground, science is about explaining why it takes 4.5 seconds.</p>
<p>These four lessons aren&#8217;t the only things I learned about math while getting my math degree but they are some of the most useful lessons I learned and are well worth the time and effort for anyone considering a career in science.  Some scientific fields don&#8217;t require advanced calculus but many do and most require at least basic statistics. All scientific fields require the disciplined rigour that I learned in advanced math courses.  Science isn&#8217;t about coming up with a creative story explaining the world that sounds good at cocktail parties it is about doing careful work to collect and analyze data that validates, or invalidates a theory. E.O Wilson&#8217;s students might be finding math hard but doing good science is also hard and our scientists of tomorrow shouldn&#8217;t be afraid of some hard work.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/613/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=613&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2013/04/21/what-i-learned-in-math-school/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>

		<media:content url="http://scanningpages.files.wordpress.com/2013/04/symbol.png" medium="image">
			<media:title type="html">symbol</media:title>
		</media:content>
	</item>
		<item>
		<title>Firefox PowerPC Spring 2013 update</title>
		<link>http://scanningpages.wordpress.com/2013/04/01/firefox-powerpc-spring-2013-update/</link>
		<comments>http://scanningpages.wordpress.com/2013/04/01/firefox-powerpc-spring-2013-update/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 03:22:54 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[powerpc]]></category>
		<category><![CDATA[ppc]]></category>
		<category><![CDATA[ppc64]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=600</guid>
		<description><![CDATA[I&#8217;ve written in the past about compiling recent versions of Firefox for the powerpc under Linux. The Firefox rapid release schedule means that a new firefox release happens almost every 6 weeks. I last wrote about firefox 16, which is now almost 4 releases old. In the past 6 months I&#8217;ve been regularly testing firefox [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=600&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve written in the <a href="http://scanningpages.wordpress.com/2012/10/15/firefox-16-powerpc/">past</a> about compiling recent versions of Firefox for the powerpc under Linux. The Firefox rapid release schedule means that a new firefox release happens almost every 6 weeks.  I last wrote about firefox 16, which is now almost 4 releases old.  In the past 6 months I&#8217;ve been regularly testing firefox builds on the powerpc  as they make their way through the development process.   I am going to summarize the state of recent firefox versions for ppc users.</p>
<p><span id="more-600"></span></p>
<p><strong>Firefox 19</strong><br />
Firefox 19 is not a bad choice for 32 bit powerpc users, a number of Linux distributions have ppc packages for this release.  Powerpc users of FF19 will find that many images show up with a blue tint.  This is due to bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=817356">817356</a> You can avoid this bug by setting <em>image.high_quality_downscaling.enabled </em>to false in about:config.  If your building firefox yourself you can also apply my patch from bug 817356 before compiling to fix this issue.</p>
<p><strong>Firefox 20</strong><br />
Firefox 20 has the blue tint issue fixed and should work fine on 32 bit powerpc.  Firefox 20 will be released in the next week I hope the community will find it works well but there is always a chance issues will be found when distributions package it.</p>
<p><strong>Firefox 21</strong><br />
Firefox 21 goes into beta next week and I have been using development builds of ff21 on my 32 bit PPC machine during the past month without issues.  This version includes a bit of additional altivec acceleration (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=817153">817153</a>) support.</p>
<p>When I build firefox 21 on my ppc32 machine I get <em>./../dist/bin/libxul.so: undefined reference to `JSContext::updateMallocCounter(unsigned int)</em> errors. I have reported these under bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=846986">846986</a> and have attached a patch that allows me to get a working firefox.  I don&#8217;t understand why I am hitting this issue with undefined inlines and on others are not. </p>
<p><strong> 64 bit PPC</strong><br />
Running firefox on a 64 bit PPC machine will be more problematic firefox 19 crashes on the first web page you try to view. This is documented in bug <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=844883">844883</a>. The patch I attached to that bug fixes the issue and will be included in Firefox 22.  The patch should apply cleanly against versions 19 through 21. Debug builds will also need the patch from <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=851859">851859</a> to avoid a startup time assertion. With these two patches I find that firefox is still crashing on the second or third page.  I suspect this is related to the problem being addressed in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=840242">840242</a> but as of now this is still an unresolved issue and I don&#8217;t have a a good solution for ppc64 users.</p>
<p>Compiling Firefox 21 or higher requires Python 2.7.  Much of my testing was done on a Debian squeeze installation and Debian squeeze doesn&#8217;t include Python 2.7. I built my version of python 2.7 (installed in (/usr/local/python2.7) to allow me to compile firefox. The firefox build system will install all of the required python packages in a virtualenv.</p>
<p>Updated: I&#8217;ve added the note on 846986 since originally publishing this article.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/600/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/600/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=600&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2013/04/01/firefox-powerpc-spring-2013-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>
	</item>
		<item>
		<title>Maproulette Hack Weekend</title>
		<link>http://scanningpages.wordpress.com/2013/03/13/maproulette-hack-weekend/</link>
		<comments>http://scanningpages.wordpress.com/2013/03/13/maproulette-hack-weekend/#comments</comments>
		<pubDate>Wed, 13 Mar 2013 02:11:29 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[openstreetmap]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[hack weekend]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[osm]]></category>
		<category><![CDATA[ryerson]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[software design]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[toronto]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=589</guid>
		<description><![CDATA[This weekend we had the second annual Toronto OpenStreetMap developer weekend. The nice folks at the Ryerson Department of Geography hosted us. My focus this weekend was to work the Serge and Martijn on maproulette Maproulette is software that presents an easy to do mapping task to users which they can complete and then mark [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=589&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This weekend we had the second annual <a href="http://wiki.openstreetmap.org/wiki/Toronto_Hack_Weekend_March_2013">Toronto OpenStreetMap developer weekend</a>.   The nice folks at the <a href="http://www.ryerson.ca/geography">Ryerson Department of Geography</a> hosted us.  My focus this weekend was to work the <a href="http://wiki.openstreetmap.org/wiki/User:Emacsen">Serge</a> and <a href="http://oegeo.wordpress.com/martijnvanexel/">Martijn</a> on <a href="http://www.maproulette.org">maproulette</a></p>
<p>Maproulette is software that presents an easy to do mapping task to users which they can complete and then mark the task as completed.  Examples of past maproulette mapping challenges include fixing connectivity errors or fixing objects touched by the license change.<br />
<span id="more-589"></span><br />
Serge and Martijn wanted to redesign parts of maproulette to make it easier develop more challenge modules.  I am going to discuss some of the design decisions we debated during the weekend.</p>
<p><strong>Challenges</strong><br />
A Challenge is a type of mapping activity that map roulette can assign to users.   Examples of challenges might be &#8216;Add bridges to roads with where we suspect a bridge exists&#8217;  or &#8216;Add the street address tags to restaurants that don&#8217;t have addresses&#8217;. </p>
<p><strong>Tasks</strong><br />
A task is a specific work item within a challenge.  In the &#8216;Add bridges to roads&#8217; challenge a task might be to add a bridge to a specific intersection (or determine that bridge should be there)</p>
<p>Maproulette needs to provide a web based interface that displays challenge tasks to users(task assignments).  This requires us to somehow store information about the tasks that make up a challenge.  Challenge specific modules will compute tasks (ie find missing bridges).  Figuring out how the web interface and the programs that find challenge tasks should be connected was one of the questions we discussed this weekend.</p>
<p><strong>Proposal 1: Discrete Modules</strong></p>
<p>Each challenge has a challenge module that supports operations such as </p>
<ul>
<li> Give me some available tasks near this lat/lon</li>
<li> Mark this task as assigned to a user </li>
<li>Mark this task as complete/skipped</li>
</ul>
<p>Each challenge module would be responsible for storing task data in it&#8217;s own<br />
format (or using database tables specific to the module).  The user&#8217;s web-browser would talk to a common front-end component that would invoke the individual challenge modules.  The challenge modules would return HTML/Javascript/JSON suitable that the browser would use in displaying information about the task to the user. </p>
<p><strong>Proposal 2: Shared Task Representation</strong></p>
<p>Challenge modules compute a list of tasks by examining a mixture of OSM and external data sources.  The challenge modules then convert these tasks into a common representation made up of a task and associated sets of task_objects.  A task to find add a missing bridge might be made up of three objects. An object for the place we think the bridge belongs, an object for the road the bridge is part of and a third object for the road/stream that the bridge crosses over.  These tasks and associated objects get stored in a database.  Tasks and associated objects for different challenges get stored in the same pair of database tables.  The web application that users interact with can then display and manipulate information about tasks from all challenges.<br />
<strong><br />
Contrasting the options<br />
</strong><br />
When designing software systems you often have two or more different approaches to a given problem.  Deciding which option to proceed with is the challenge software designers have to face.  Some of the questions I asked myself this weekend included</p>
<ul>
<li><em>How can code between different challenges be shared or re-used in each of the options? </em>.  The second approach sounds like it has more places where code can be re-used because all challenges use the same data model for assigning tasks</li>
<li><em>Is one approach more flexible than the other? Are there things different challenges might deal with differently that will be hard to accommodate with one of the designs? </em> Our concern with the second proposal was that we were generalizing all challenges to object + geometry and not much else.  What if some challenges needed to display extra things such as textual hints?</li>
<li><em>How do the proposals make it easier or harder for someone to come along and develop a new challenge?</em>   In the first approach a challenge developer can has free reign to implement things in any fashion they like as long as they implement the task assignment API I discuss above.  In the second proposal challenge authors can still pick their programming language and methods for detecting challenges but they must use the database schema we provide for storing information about tasks.  With the second approach challenge developers only need to worry about writing programs to find challenge tasks and store them in the database. Task assignment/management is handled by the common code</li>
</ul>
<p><strong><br />
A third proposal<br />
</strong><br />
We were still debating the merits of these different approaches on  late-morning on Sunday when we decided to take a break and go for lunch.  One would think that a group of mappers would know lots of places nearby for lunch in downtown Toronto but we seemed to be wondering aimlessly back and forth down the street.   While we were doing this we came up with the idea of a shared database schema approach like proposal 2 but letting each challenge store a blob of  JSON with the task.  Each challenge would also implement challenge specific rendering/display could that would know how to take the JSON describing the task and display information about the task to the user in a meaning full way.</p>
<p>I want to thank <a href="http://weait.com">Richard Weait</a> for organizing this weekend and Serge and Martijn for letting me participate in the design process.  Next we need to finish implementing what we discussed.  This should help us figure out if our ideas were good ideas.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/589/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=589&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2013/03/13/maproulette-hack-weekend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>
	</item>
		<item>
		<title>Python urllib2, cookies and OpenStreetMap</title>
		<link>http://scanningpages.wordpress.com/2012/12/29/python-urllib2-cookies-and-openstreetmap/</link>
		<comments>http://scanningpages.wordpress.com/2012/12/29/python-urllib2-cookies-and-openstreetmap/#comments</comments>
		<pubDate>Sat, 29 Dec 2012 06:00:36 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[openstreetmap]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[osm]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[urllib2]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=576</guid>
		<description><![CDATA[I found the documentation on urllib2 a bit unclear about how to get cookie handling working properly. I was working on a python script that needed to contact the OpenStreetMap web server, login with my OSM credentials and interact with the website. The first step is to setup a urllib2 opener instance that is configured [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=576&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I found the documentation on urllib2 a bit unclear about how to get cookie handling working properly.</p>
<p>I was working on a python script that needed to contact the OpenStreetMap web server, login with my OSM credentials and interact with the website.</p>
<p>The first step is to setup a urllib2 opener instance that is configured to store cookies.</p>
<p><code></p>
<pre>
import cookielib,Cookie,urllib2,urllib
import xml.etree.cElementTree as ElementTree

cookies = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies))
</pre>
<p></code></p>
<p>This will create an opener that can be used to retrieve URL&#8217;s.  Any cookies set in the HTTP response will be stored in the cookie&#8217;s cookie jar.  If I needed to add additional openers (ie for special redirect handling) I would just add them as additional parameters to the build_opener call.   ie urllib2.build_opener(handler1, handler2,handler3)&#8230;</p>
<p>Next we need to contact OpenStreetMap to get a blank login form.  The blank login screen has a hidden variable &#8216;authenticity_token&#8217; that needs to be passed back as part of the POST with my login credentials<br />
 <code></p>
<pre>
inptag = '{http://www.w3.org/1999/xhtml}input'
formtag = '{http://www.w3.org/1999/xhtml}form'
# fetch the blank login form
response_tokenfetch = opener.open(request)
html = response_tokenfetch.read()
htmlfile=StringIO.StringIO(html)
# parse the HTML elements in the form
# extract any input fields for later resubmission
# this will pick up the authenticity_token and anything else
xml_tree = ElementTree.parse(htmlfile)
for form in xml_tree.getiterator(formtag):                
    for field in form.getiterator(inptag):
        if 'name' in field.attrib and 'value' in field.attrib:
                login_payload[field.attrib['name']] = field.attrib['value']
login_payload['username'] = username
login_payload['password'] = password
login_payload['remember_me'] = 'yes'
login_payload['cookie_test'] = 'true'
</pre>
<p></code></p>
<p>Next we submit the LOGIN request as a POST.  Any session cookies returned as part of the blank form will be added to the second request.<br />
<code></p>
<pre>
cookies.add_cookie_header(request)
response = opener.open(request,urllib.urlencode(login_payload))
</pre>
<p></code></p>
<p>If our login was successful then cookies contains an _osm_session and _osm_username that will be used in subsequent API calls.</p>
<p><code></p>
<pre>
request2=urllib2.Request('http://api06.dev.openstreetmap.org/user/stevens/inbox)
cookies.add_cookie_header(request2)
response2 = opener.open(request2)
html=response2.read()
</pre>
<p></code></p>
<p>You could then parse the HTML to extract a list of messages.<br />
If your using the formal OpenStreetMap API (ie calls under /api/0.6/&#8230;) then you should instead use oauth for authentication instead of logging in through the website.  Some OSM features such as messaging can only be accessed by pretending to be a web session and parsing/faking HTML.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/576/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/576/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=576&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2012/12/29/python-urllib2-cookies-and-openstreetmap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>
	</item>
		<item>
		<title>Pl/Python talk at Pycon Canada</title>
		<link>http://scanningpages.wordpress.com/2012/11/13/plpython-talk-at-pycon-canada/</link>
		<comments>http://scanningpages.wordpress.com/2012/11/13/plpython-talk-at-pycon-canada/#comments</comments>
		<pubDate>Tue, 13 Nov 2012 03:54:25 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[pyconca]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=561</guid>
		<description><![CDATA[I spent the weekend attending Pycon Canada where I gave a talk on Pl/Python. I want to thank the conference organizers for putting on an excellent conference. I am told that this was the first time Pycon had a regional conference in Canada and that it was put together by a group of volunteers in [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=561&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I spent the weekend attending Pycon Canada where I gave a talk on Pl/Python.  I want to thank the conference organizers for putting on an excellent conference.  I am told that this was the first time Pycon had a regional conference in Canada and that it was put together by a group of volunteers in less than 6 months.</p>
<p>One of my favourite parts of local/regional conferences  held on weekends is that they tend to attract attendees who are passionate about computers and technology.  The people who I spoke with at the conference were there because they wanted to be there,not because there boss wanted them to be there, and either loved Python or wanted to learn more about it.  I&#8217;ve attended many great PostgreSQL conferences over the past few years but it was nice to spend sometime talking with people from broader development backgrounds.</p>
<p>In my discussions with people at the conference I noticed a trend. People I spoke with who are working at companies that did Python development tended to be using PostgreSQL. The ones that weren&#8217;t currently using PostgreSQL were using MySQL and talking about moving to PostgreSQL or were apologetic for still being on MySQL. The MySQL users were often apologizing before I told them that I was a PostgreSQL contributor.  Some of the MySQL users also mentioned that they were using non-Oracle forks like Percona.</p>
<p>This was in contrast to the people at the Python conference that described their workplaces as doing primarily Java development. The Java development shops tended to be using Oracle or SQL Server. I admit that the sample size of of the Java developers wasn&#8217;t that big (this was a Python conference after all) but my observations are worth keeping in mind since they might be indicating a pattern. Other people have commented about the popularity of PostgreSQL in the Ruby community.</p>
<p>I wonder how much of this observations is because older written in Java are already using SQL Server/Oracle and there hasn&#8217;t been a strong enough driver to change to PostgreSQL.  While newer software projects are tending to choose Python or Ruby over Java and at the same time picking a FLOSS database such as PostgreSQL where they don&#8217;t have to worry about migrating a legacy application.</p>
<p>My talk on writing stored functions in Pl/Python was well received.  A lot of people saw appeal in being able to write their stored functions in Python instead of pl/SQL but that shouldn&#8217;t be a surprise considering  this was a Python conference.</p>
<p>My slides are available <a href='http://scanningpages.files.wordpress.com/2012/11/python_in_database_pyconca2012.pdf'>here</a>, the video of the talk is posted at <a href="http://pyvideo.org/video/1592/python-in-your-database" target="_blank">pyvideo</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/561/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/561/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=561&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2012/11/13/plpython-talk-at-pycon-canada/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>
	</item>
		<item>
		<title>Firefox 16, powerpc</title>
		<link>http://scanningpages.wordpress.com/2012/10/15/firefox-16-powerpc/</link>
		<comments>http://scanningpages.wordpress.com/2012/10/15/firefox-16-powerpc/#comments</comments>
		<pubDate>Mon, 15 Oct 2012 03:27:05 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox 16]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[powerpc]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=555</guid>
		<description><![CDATA[A few months ago I wrote a blog post on compiling FireFox for the powerpc on Debian Linux. I had built Firefox 9 when I was writing that post and in the intervening months, thanks to the Mozilla rapid release cycle, Firefox 16 has been released. Does Firefox 16 still build on the powerpc with [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=555&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A few months ago I wrote a <a href="http://scanningpages.wordpress.com/2012/01/25/firefox-9-on-powerpc/">blog post</a> on compiling FireFox for the powerpc on Debian Linux.  I had built Firefox 9 when I was writing that post and in the intervening months, thanks to the Mozilla rapid release cycle, Firefox 16 has been released.  Does Firefox 16 still build on the powerpc with Debian Squeeze?</p>
<ol>
<li>I downloaded the latest firefox source code from <a href="ftp://ftp.mozilla.org/pub/firefox/releases/16.0.1/source/firefox-16.0.1.source.tar.bz2"> mozilla</a></li>
<li>This time I didn&#8217;t need to apply any patches for the powerpc.</li>
<li>When I ran ./configure followed by &#8216;make&#8217; as described in my post on Firefox9 I encountered a compile error.<br />
<em>syntax error in VERSION script</em> when trying to build libraries in the subdirectories under <em>security/nss/lib</em> such as util (libnssutil).
</li>
</ol>
<p>The issue is that the mapfiles such as <em>security/nss/lib/util/nssutil.def</em> that are included in the source tree are not suitable as input files to the linker but need to be pre-processed first.  The rules to process the &#8216;MAPFILE&#8217; are defined in security/coreconf/Linux.mk and are invoked by a rule in security/coreconf/Rules.mk that build a proper mapfile by running the mapfile distributed in the source tree (such as nssutil.def) through sed and grep to produce a file that can be passed to the linker.</p>
<p>The make rule takes a mapfile $(MAPFILE_SOURCE)=nssutil.def and generates $(MAPFILE)=nssutil.def from it.  If you try building firefox as I describe above it will put the output files in the same directory as the input files.  This means that the sed/grep rule won&#8217;t be executed because the target (nssutil.def) is already present and isn&#8217;t older than the dependency (nssutil.def), itself.</p>
<p>If you instead</p>
<ol>
<li>Set the shell environment variable MOZ_OBJDIR to be a  directory other than the source directory</li>
<li>Put your configure options in the file .mozconfig, as described in the Mozilla build instructions</li>
<li>Run <em>make -f client.mk</em> </li>
</ol>
<p>firefox 16 will build successfully.  The issues I encountered with the version script shouldn&#8217;t be specific to the powerpc or debian.  </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/555/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/555/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=555&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2012/10/15/firefox-16-powerpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning from mistakes</title>
		<link>http://scanningpages.wordpress.com/2012/08/16/learning-from-mistakes/</link>
		<comments>http://scanningpages.wordpress.com/2012/08/16/learning-from-mistakes/#comments</comments>
		<pubDate>Thu, 16 Aug 2012 23:38:02 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[openstreetmap]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[foss4g]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[mistakes]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[osgeo]]></category>
		<category><![CDATA[post-mortem]]></category>
		<category><![CDATA[project-management]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=549</guid>
		<description><![CDATA[Last year I attended and wrote about FOSS4G 2011 in Denver. The 2012 FOSS4G event was supposed to take place in Beijing this September. Last month OSGEO announced that the conference was cancelled. Cameron Shorter has posted a detailed analysis on how the conference fell apart. His post does a great job of looking at [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=549&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Last year I attended and wrote about <a href="http://scanningpages.wordpress.com/2011/09/17/big-tent-conferences/">FOSS4G 2011</a> in Denver.  The 2012 FOSS4G event was supposed to take place in Beijing this September.  Last month OSGEO announced that the conference was cancelled.<br />
<a href="http://cameronshorter.blogspot.ca/">Cameron Shorter</a> has posted a <a href="http://lists.osgeo.org/pipermail/conference_dev/2012-August/001886.html">detailed analysis</a> on how the conference fell apart.  His post does a great job of looking at the sequence of events that lead up to the current situation.</p>
<p><span id="more-549"></span></p>
<p>In the corporate world when an event, company or product falls on its face the detailed reasons are hushed up and rarely get a public airing.  When the government screws up sometimes we get an expensive public inquiry where lawyers argue about how someone else did or didn&#8217;t screw up.  OSGEO has a tradition of building consensus and discussing non-technical issues on their mailing lists.  Good open-source projects not only be give us amazing software but they allow us to learn valuable lessons on public relations, finances and management by letting us watch their inner-workings.</p>
<p>When I was learning too fly airplanes I made a point of regularly reading the investigation reports of plane crashes. A common theme was that a single mistake didn&#8217;t cause the accident but a chain of mistakes, malfunctions and bad luck all added up to the crash. Common thinking in the aviation community is that if you learn about the mistakes others have made then you will be more likely to avoid making the same mistakes.  The story Cameron tells is about limited options, ignoring red flags, communication break downs and bad luck.  These are all issues we see everyday across all aspects of life.</p>
<p>The mailing list discussion about the lessons that can be learned for future FOSS4G events is still on-going but as outsiders we can follow their discussion and try to learn from their mistakes.  When our events, initiatives or products don&#8217;t succeed we should also conduct a carefully look at how we got to that state and what things, with 20/20 hindsight, we should have paid more attention too.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/549/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/549/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=549&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2012/08/16/learning-from-mistakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>
	</item>
		<item>
		<title>Software Infrastructure</title>
		<link>http://scanningpages.wordpress.com/2012/08/05/software-infrastructure/</link>
		<comments>http://scanningpages.wordpress.com/2012/08/05/software-infrastructure/#comments</comments>
		<pubDate>Sun, 05 Aug 2012 20:52:17 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[mono-rail]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[project-management]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[software infrastructure]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=532</guid>
		<description><![CDATA[Software infrastructure is a lot like municipal infrastructure such as highways, subways, and stadiums. Everyone likes to enjoy the benefits but we seem to have difficulties on when to build it, what to build, or how to pay for it. I like to think of software infrastructure as the software components you use that you [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=532&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://scanningpages.files.wordpress.com/2012/08/cn_train.jpg"><img src="http://scanningpages.files.wordpress.com/2012/08/cn_train.jpg?w=300&#038;h=200" alt="CN Freight Train" title="cn_train" width="300" height="200" class="aligncenter size-medium wp-image-546" /></a><br />
Software infrastructure is a lot like municipal infrastructure such as highways, subways, and stadiums.  Everyone likes to enjoy the benefits but we seem to have difficulties on when to build it, what to build, or how to pay for it.</p>
<p><span id="more-532"></span></p>
<p>I like to think of software infrastructure as the software components you use that you aren&#8217;t in the core business of providing or selling.  If your running a cloud hosting company then the virtualization  and provisioning software are the product your selling.  The software you use for processing credit card payments and emailing customers are infrastructure components you use.   If your business is providing credit card payment services to websites then the software that does this is part of your core product but the virtualization software you use is part of your infrastructure.</p>
<p>Facilities for logging, message queues, automated deployment and configuration, monitoring builds and unit tests, tracking performance are all common examples of software infrastructure.   This isn&#8217;t a post about build versus buy, this is is a post about figuring out when you need components, how good they need to be and how you should go about building and integrating them.</p>
<p>Infrastructure components like municipal infrastructure are usually used by different teams in your organization for different purposes. The individual communities along an expressway often can&#8217;t justify building a 6 line highway through their community but can justify it once they partner with neighboring towns to build a connected road.  Software infrastructure works the same way.  When multiple departments or business units start to connect with shared infrastructure benefits show up.  Shared infrastructure components allow different departments to share data, expertise and costs. </p>
<p>However not all infrastructure will help accomplish this. One of my favourite episodes of The Simpsons is the monorail episode.  The town of Springfield comes into some money and have a townhall to decide how to spend it. The townsfolk buy into a song and dance routine and build a mono-rail. The monorail is good for some laughs but not much else and it results in a  trainwreck. This frequently happens with software where a slick sales demo promises a solution to cure all your problems convincing most people to go for snappy tunes instead of thinking things through.</p>
<p>So when do you build a piece of infrastructure? Many agile techniques including scrum say that you should only allocate resources for infrastructure items when you need them to meet your immediate business needs. The agile approach is to only build enough infrastructure to meet your needs in this sprint.  You don&#8217;t pave the highway if the items in this sprint can get by with a dirt road.</p>
<p>One of the problems with this approach is that it gives other departments very little incentive to collaborate or share your infrastructure.  It is easier for the team next door to build their own dirt road then to negotiate access rights and a route diversion on your dirt road.  If you had built 4 lane paved road then it might be worth their while to work with you and help fund the ongoing maintenance but you didn&#8217;t build that paved road.</p>
<p>A good option is to work with the next town to upgrade the dirt road to a paved road when they show interest.  With this approach you might build a lightweight logging infrastructure that meets your immediate needs.  You let other departments know that you&#8217;ve done this and when they have some additional logging needs you invite them in to improve the logging infrastructure you wrote.  Your neighbour turns your chicken-wire fence into a wood one to keep kids from wondering into his yard.  This approach allows you to avoid expensive upfront infrastructure costs and temptations to build mono-rails while still being able to collaborate on shared infrastructure.</p>
<p>In the open-source world this happens all the time.  One open-source project will submit patches &#8216;upstream&#8217; to another open-source project to make the software more useful for themselves or to avoid having to duplicate something that another project has written. Open-source project developers tend to be good  collabarators (otherwise they wouldn&#8217;t have an open-source <strong>project</strong> they will just have released their code under an open source license).  The tools we use in open-source (git, public mailing lists with archives, open bug trackers, build instructions) all make this type of activity easier.</p>
<p>In the corporate world things are rarely this simple.  Politics, juvenile ideas of code ownership, security policies, and cost accounting often come into play to discourage this type of collaboration. Centrally planned infrastructure components can avoid this problem, just like a good way to build a railway is to have the federal government drive the process.  This might work if your upper management cares enough about a particular piece of infrastructure but, more often than not, this doesn&#8217;t happen because infrastructure components are not what your in the business of selling.  Building centrally planned infrastructure is also not keeping with agile principals and requires a big up-front investment.  A lot of the time agile development teams won&#8217;t know exactly what their requirements are for components far enough in advance to allow them to give meaningful requirements to a long term centrally planned project.  </p>
<p>Another approach that can work is to have a team dedicated to  building (or purchasing) software infrastructure components and working with other teams in integrating these components.  This allows an infrastructure team to see the requirements of multiple teams and find common solutions.   The infrastructure team would have a budget and mandate to build infrastructure. The challenge is to manage just-in-time demands from different teams in providing the components in a useable manner that meets the agile time-lines of the teams that need the infrastructure.  A dedicated infrastructure team can also work on the infrastructure backlog by finding deficient infrastructure components that multiple products lack and then upgrading and integrating the improved components into multiple products.</p>
<p>Don&#8217;t settle for a spaghetti network of dirt roads or mono-rail train-wrecks. Learn about the infrastructure that other projects and departments in your company have built (or have bought/downloaded and integrated) and find a way that you can expand on it instead of building or buying your own.  As your team builds components identify which ones fall into the infrastructure category and decouple them from your projects core code so that other teams can easily reuse these components when the need comes up.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/532/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/532/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=532&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2012/08/05/software-infrastructure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>

		<media:content url="http://scanningpages.files.wordpress.com/2012/08/cn_train.jpg?w=300" medium="image">
			<media:title type="html">cn_train</media:title>
		</media:content>
	</item>
		<item>
		<title>PGCon2012 &#8211; Making Maps</title>
		<link>http://scanningpages.wordpress.com/2012/05/22/pgcon2012-making-maps/</link>
		<comments>http://scanningpages.wordpress.com/2012/05/22/pgcon2012-making-maps/#comments</comments>
		<pubDate>Tue, 22 May 2012 01:16:34 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[openstreetmap]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[fosslc]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[mapnik]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[osm]]></category>
		<category><![CDATA[pgcon]]></category>
		<category><![CDATA[postgis]]></category>
		<category><![CDATA[qgis]]></category>
		<category><![CDATA[tilemill]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=515</guid>
		<description><![CDATA[Slides from my 2012 PGCon presentation Making your Own Maps are now available The presentation covered Common reasons people render their own maps Where to get OpenStreetMap data and how to load it into your PostGIS database How to use Tilemill to design your own map style How to render map tiles, both statically and [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=515&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Slides from my 2012 PGCon presentation <a href="http://www.pgcon.org/2012/schedule/events/432.en.html" target="_blank"><em>Making your Own Maps</em></a> are now  <a href="http://scanningpages.files.wordpress.com/2012/05/pgcon_makingmaps2012.pdf">available</a></p>
<p><a href="http://scanningpages.files.wordpress.com/2012/05/pgcon_makingmaps2012.pdf"><img src="http://scanningpages.files.wordpress.com/2012/05/pgcon2012.png?w=300&#038;h=225" alt="" title="pgcon2012" width="300" height="225" class="aligncenter size-medium wp-image-516" /></a></p>
<p>The presentation covered</p>
<ul>
<li>Common reasons people render their own maps</li>
<li>Where to get OpenStreetMap data and how to load it into your PostGIS database</li>
<li>How to use Tilemill to design your own map style</li>
<li>How to render map tiles, both statically and dynamically </li>
<li>How to use OpenLayers to display your map</li>
</ul>
<p>The presentation was recorded.  I will update this post when the recording comes online.</p>
<p>I&#8217;ve been a regular attendee of PGCON since the first year it was held in Ottawa.  Like past years I enjoyed the conference and I would like to thank Dan Langille for putting together another first-rate conference.  My favourite part of PostgreSQL conferences is meeting and reconnecting with users people in the community.   </p>
<p>Updated: The video is available <a href="http://www.youtube.com/watch?v=yctOoHoiQJ4">here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/515/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=515&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2012/05/22/pgcon2012-making-maps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>

		<media:content url="http://scanningpages.files.wordpress.com/2012/05/pgcon2012.png?w=300" medium="image">
			<media:title type="html">pgcon2012</media:title>
		</media:content>
	</item>
		<item>
		<title>Penlake Map May 2012</title>
		<link>http://scanningpages.wordpress.com/2012/05/06/penlake-map-may-2012/</link>
		<comments>http://scanningpages.wordpress.com/2012/05/06/penlake-map-may-2012/#comments</comments>
		<pubDate>Sun, 06 May 2012 18:53:50 +0000</pubDate>
		<dc:creator>scanningpages</dc:creator>
				<category><![CDATA[openstreetmap]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[huntsville ontario]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[osm]]></category>
		<category><![CDATA[pen lake]]></category>
		<category><![CDATA[peninsula lake]]></category>
		<category><![CDATA[penlakemap]]></category>
		<category><![CDATA[tilemill]]></category>

		<guid isPermaLink="false">http://scanningpages.wordpress.com/?p=501</guid>
		<description><![CDATA[I have published a new version of the Peninsula Lake map. This edition includes new cartography and map updates based on my survey work last summer. I had written the previous map style in Cascadnik, a CSS like language that translates to mapnik XML. Cascadnik has since been replaced by Carto so I have decided [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=501&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div id="attachment_508" class="wp-caption aligncenter" style="width: 310px"><a href="https://scanningpages.files.wordpress.com/2012/05/penlake-2012-05.png"><img src="https://scanningpages.files.wordpress.com/2012/05/penlake-2012-05-small1.png?w=300&#038;h=165" alt="Peninsula Lake Map" title="penlake.2012.05.small" width="300" height="165" class="size-medium wp-image-508" /></a><p class="wp-caption-text">Peninsula Lake, Huntsville Ontario</p></div>
<p>I have published a new version of the Peninsula Lake map.  This edition includes new cartography and map updates based on my survey work last summer. </p>
<p>I had written the previous map style in Cascadnik, a CSS like language that translates to mapnik XML.   Cascadnik has since been replaced by Carto so I have decided to rewrite the map style using <a href="http://mapbox.com/tilemill" target="_blank">TileMill</a> (Map design software that uses Carto and Mapnik). </p>
<p>One of my goals while redesigning the map was to put to use what I have learned about cartography over the past year.  The original PenLake map style was based on a sample Cascadnik style adapted to my colour scheme, nautical features and a print scale.   The new style was designed by me from scratch to focus on</p>
<ul>
<li>The lake and nearby rivers, streams and marshes</li>
<li>Recreational attractions around the lake including hotels and golf courses</li>
<li>Roads near the lake</li>
<li>The water depth of the lake including suspected rocks</li>
</ul>
<p>This style is much smaller than the previous one ( the style is less than 300 lines of CSS) and it behaves well at different zoom levels between 12 and 18.   I suspect the number of layers can still be further reduced for faster rendering times.</p>
<p>I have made a web version of the map available on <a href="http://www.mapexplorer.org/penlakemap" title="Peninsula Lake Map" target="_blank">Peninsula Lake Map</a> my map <a href="http://www.mapexplorer.org">hosting site</a>.  The map tiles are currently being served by <a href="http://www.mapbox.com" title="MapBox" target="_blank">MapBox.</a></p>
<p>Some of the water depth data in this version of the map is based on observations I manually made while kayaking on the lake in the summer of 2011.   I have tried to correct this data to match the sounding datum used by the CHS in their observations.  I don&#8217;t expect the observations taken by me with a kayak, rope and a tape measure to match the accuracy of the CHS with their fancy sonar but we have to work with the equipment that we have available to us.  The depths on the map should be based on a datum of 913 feet.</p>
<p>The Source code is still available from <a href="http://github.com/ssinger/penlakemap" target="_blank">github</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/scanningpages.wordpress.com/501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/scanningpages.wordpress.com/501/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=scanningpages.wordpress.com&#038;blog=13081650&#038;post=501&#038;subd=scanningpages&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://scanningpages.wordpress.com/2012/05/06/penlake-map-may-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/42e7367ea86bb9c5fc44b02c814d9e54?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">scanningpages</media:title>
		</media:content>

		<media:content url="https://scanningpages.files.wordpress.com/2012/05/penlake-2012-05-small1.png?w=300" medium="image">
			<media:title type="html">penlake.2012.05.small</media:title>
		</media:content>
	</item>
	</channel>
</rss>
