CN Freight Train
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.

Read the rest of this entry »

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 dynamically
  • How to use OpenLayers to display your map

The presentation was recorded. I will update this post when the recording comes online.

I’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.

Updated: The video is available here

Peninsula Lake Map

Peninsula Lake, Huntsville Ontario

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 to rewrite the map style using TileMill (Map design software that uses Carto and Mapnik).

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

  • The lake and nearby rivers, streams and marshes
  • Recreational attractions around the lake including hotels and golf courses
  • Roads near the lake
  • The water depth of the lake including suspected rocks

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.

I have made a web version of the map available on Peninsula Lake Map my map hosting site. The map tiles are currently being served by MapBox.

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’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.

The Source code is still available from github

The Toronto OSM hack weekend (2012) started on friday with an introduction to OpenStreetMap presentation at the Ryerson Geography department. Experienced OpenStreetMap presenter, Richard Weait gave a talk to a room of Geography students, staff and faculty. After Richard explained the basics of OpenStreetMap A.J. and Tristen gave a short presentation on some of the work that they have been doing for MapBox.

After the presentations we did a QA session with the audience. The OSM ‘experts‘ in the room tried to answer the questions from the audience. Most people in the audience were geographers and GIS people who had already heard of OSM. A number of the attendees already had worked with various components in the OSM stack. We had questions on projections, layers, TileMill, Mapnick, tagging and an assortment of other topics.

After the Q/A I went with A.J and Tristen to Chiplote for some Burritos. At Chipotle we learned three things. 1) Chipotle in Washington does more of the meat preperation in the back room than they do in Toronto; Toronto should take a hint. 2) Keeping the Burrito in the tinfoil wrap it in keeps it from falling apart as you eat it. 3) Next time I need to remember to bring Buritos back to my fellow hackers. Friday night we had a social at the hack weekend social HQ, there was plenty of beer and the room was packed.

Saturday morning I took the train back downtown for the first day of hacking. We had local OSM developers and out of town hackers from three different countries participate along with a group of Ryerson Geography students. I spent some time Saturday morning helping someone get the rails port working on their OSX laptop. The part they seemed to have the most difficulty with was getting PostgresSQL running. This tells me two things. First that the work people in the OSM community have done to make the rails port easier to install has paid off and some PostgreSQL binary distributions could make their user experience a bit better.

I had suggested the EDB one-click installer for OSX but they opt’d for the KyngChao binaries. They were okay installing the package but they weren’t clear how to startup PostgreSQL and connect to it. I feel that the EDB installer makes it easier for an inexperienced PostgreSQL user to get up and running.

In addition to helping people with installing PostgreSQL I also helped some people with SQL queries and helped with changes to the website look cleaner for users logged in but haven’t uploaded any GPX traces.

Saturday night we had another party at social HQ. Party highlights included beer with ingredients from seven continents, comparision of political systems, talk of election rigging. Thai food, wine and beer were also spotted. Most of the geography students from the hack sessions were able to make it out and saw how fun OSM parties can be. I hope to see them at the regular Toronto OSM pub nights.

The GO train back to Oakville was pretty full. This was St. Patricks day and the streets of Toronto were filled with drunk people in green. The 11:43pm train to the suburbs is a bit too early for serious leprecons. Many of the riders had been at a Van Halen concert, it didn’t seem like many of them were interested in making maps.

There is a saying in the OpenStreetMap world that if you want to build an local OpenStreetMap community you should import a bunch of Germans. If you can’t import some Germans the next best thing is to import Richard Weait. He almost single-handedly organized the Toronto hack weekend, secured a venue and provided food, drinks and social entertainment. I also want to thank the Ryerson Geography department and Claus Rinner for letting us use their facilities and providing eager GIS students.

February 6′th 2012 marks the 10 year anniversary of the open source release of the DBMirror replication system. DBMirror was not the first PostgreSQL replication solution to be released but it was the first one I was involved with.

In the summer of 2001 I was working for Navtech System Support, an aviation software company. We were using PostgreSQL 6.x to store data for one of our applications. We needed to have an up to date copy of the database available on servers at a remote site. We also needed a standby database server in case our primary server failed.
Read the rest of this entry »

Firefox 9 on PowerPC

Posted: January 25, 2012 in Uncategorized
Tags: , , ,


My main desktop computer at home is a PowerPC based Mac Mini. I have been running it as a debian Linux system since I bought the machine in 2006. One of my reasons for going with PowerPC was to be different. Choice in CPU architecture is important just like choice in software.

Debian Squeeze includes Firefox (iceweasel) 3.6. The Mozilla rapid release schedule means that in the past year firefox 4, 5, 6, 7, 8 have all come and gone. Newer versions of firefox are rumored to be faster and more memory efficient. Speed and memory efficiency are important if your running a 6+ old mac mini.

I don’t want to upgrade my debian installation to something unstable. Nor could I find packaged powerpc binaries at the Debian Mozilla Team Site. This left me with compiling my own.

I am pleased to report that all I had to do was

  1. Download a source tar for Mozilla 9.0.1
  2. Manually apply the fix for Bug 703534 which involved editing one line in js/src/jscompartment.cpp to fix a compile error
  3. run ./configure
  4. run make
  5. run make install

I have heard rumors that the Mozilla team isn’t officially supporting PowerPC anymore. I am glad that firefox still builds and hope people continue to submit patches and take the time to keep Mozilla running on as many platforms as possible including Linux PowerPC.

Looking back on my activities in the past few months I realize that there have been a few occasions where my role has been to help with the troubleshooting process. In the past year I have given talks at PGEast and PGEU on troubleshooting Slony but the process I use applies to most technology problems.

Read the rest of this entry »