Event vs. DOM Driven Parsing of XML

I recently have been playing with parsing GPX files and spitting out the results into a special KML file. I initially wrote a parser using minidom, yet after running this the first time – and my Core2Duo laptop reaching 100% utilization for 10 seconds – I realized I needed to re-write it using something else. I spent a little time reading the different parsers for XML and eventually read more about cElementTree. And it is included with Python2.5, sweet.
Read Event vs. DOM Driven Parsing of XML

Setting up Windows 2003 as an NTP Client

I have had to search for the commands to setup a Windows 2003 box as an ntp client a few times now, so have decided to finally write them down here for my own good measure. Funny thing is, I’m pretty sure there are three ways to setup a 2003 box as an ntp client. Open up the cmd prompt and type in: w32tm /config /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" /syncfromflags:MANUAL /reliable:YES /update net time setsntp: "0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org" Type in gpedit.msc and your local GPO editor will pop up. Go to the folder as indicated in the below screenshot and Enable the “Enable Windows NTP Client” option. Next …
Read Setting up Windows 2003 as an NTP Client

Baby Steps at Graphing Traffic

Status: ✅ You can likely tell that I’ve been having some fun with graphing and mapping recently. I was reading a few articles about GIS and stumbled upon a pretty darn cool project at Webopticon, which included cool pictures. I showed it to a friend thinking they would find it interesting, and then realized: oh! KML has an altitude attribute. That could be interesting. One of my projects is to create maps of Sydney’s traffic, so I have been experimenting heavily with Mapnik and OSM. I figured I could have some fun and finally parse some gps tracks and display the data.
Read Baby Steps at Graphing Traffic

Setting up a Mapnik Server on Ubuntu

First, we go ahead and install the needed packages. I’ve tried to include “my” list of packages that were needed to get a vanilla 7.10 image up to steam. apt-get install build-essential libltdl3-dev autoconf libtool automake \ postgresql postgresql-8.2-postgis postgresql-server-dev-8.2 \ wget subversion libboost-python1.34.1 libboost-thread-dev \ libboost-program-options-dev libboost-regex-dev \ libboost-python-dev libboost-serialization-dev \ libboost-filesystem-dev libpng12-dev libjpeg62-dev \ libtiff4-dev zlib1g-dev libfreetype6-dev libgeos-dev \ unzip apache2-prefork-dev Next we start to download a few components. I did this in my home directory, /home/kelvin
Read Setting up a Mapnik Server on Ubuntu

Notes on Installing mod_tile for Mapnik

I have no idea if these notes on how to install mod_tile will be useful for anybody. The current readme states that you need to edit the source code, but never actually where. Well, this is where, at least until the code can either take switches or can auto-configure itself. This is quite brief, so if you need more details, shoot me an email or leave a comment. I have repeated this process on two Ubuntu 7.10 machines.
Read Notes on Installing mod_tile for Mapnik

ethX Issues with Xen and Ubuntu

My new guest VMs under Xen seem to be having issues where upon each reboot, the network interface gets incremented by 1. For instance, it starts at eth0, then goes to eth1, then eth2, and eventually ethX. There are two issues to fix: 1) get the count back to 0, and 2) stop it from counting again. I was able to get them to decrease by looking in the /etc/udev/rules.d/70-persistent-net.rules file and removing all entries.
Read ethX Issues with Xen and Ubuntu

Installing Mapnik on Ubuntu 7.10

I have managed to install mapnik 0.4, 0.5, 0.5.1 and various SVN releases in-between on Ubuntu. While this isn’t in itself exciting, I think I manage to stumble at every installation. I typically forget to add the flags when building, so, to prevent myself from stumbling again, I’m going to write them out here. Build mapnik $ python scons/scons.py PYTHON=/usr/bin/python \ PGSQL_INCLUDES=/usr/include/postgresql \ PGSQL_LIBS=/usr/lib/postgresql BOOST_INCLUDES=/usr/include/boost BOOST_LIBS=/usr/lib Then install it $ sudo python scons/scons.py install PYTHON=/usr/bin/python \ PGSQL_INCLUDES=/usr/include/postgresql \ PGSQL_LIBS=/usr/lib/postgresql BOOST_INCLUDES=/usr/include/boost BOOST_LIBS=/usr/lib …
Read Installing Mapnik on Ubuntu 7.10

Hard Drive Bugs

This is a fairly inconsequential entry, but I found the incident amusing. I assembled my external drive enclosure this morning and noticed a bug crawling around inside it; I hadn’t used the enclosure in a while. I decided not to interrupt what I was doing to remove it, so I closed the enclosure and hoped for the best. About an hour later, while moving files from my laptop onto the drive, I heard a dreadful “blugrrrrrrrrrrrr.” I looked over and said, “Oh no!” For a few seconds, I thought the hard drive was failing. Then I realised the bug had tried to crawl out through the little fan.
Read Hard Drive Bugs

I Caught a Fish

Yesterday, I was lucky enough to go on a boat ride with my co-workers as a team-building activity. Although we didn’t do the usual team-building exercises, I think everyone had a great time. Clinton and I brought a case of beer, Alanna brought the wine and food, and James was the designated boat driver.
Read I Caught a Fish

And Yet Another Remodel

I have finally decided to do another remodel of this site. I had a few goals before starting: Use one image Use the YUI-CSS framework Use Django Make it easily extendable So far, I think I’ve accomplished these goals. The site is easier to read, easy to modify, and has a few new features. More entries to come!
Read And Yet Another Remodel