Creating code, mostly for the fun of seeing it work.

Starting out

OSMPosted by Chris Thu, September 25, 2008 12:32:13
I've been working on some code on and off for a few of weeks, but not with a blog to match. Rather than go through the whole stuff to date, I'll fill in the gaps as need be.

My background did not include Linux, but Open Street Map (OSM) is Linux orientated and especially open-source software. On a PC I would turn to Delphi or C# on Dot Net to create a program and I have experimented with such code, but it is largely spurned by the OSM community. Much of the coding for client PCs is in Perl - it works across different platforms but it doesn't float my boat. So I set out to reacquaint myself with C++.

I have a machine with Ubuntu 8.04 on it. I'm still learning more about Ubuntu, and I'm steadily becoming more confident and content with it. I installed g++ and created a few examples to get going again. It feels a bit clunky using a command line and it feels really hard work without code completion in an IDE, but I decided that I wanted to work from the ground up to be sure I understand.

OSM data is accessed from the server by HTTP and arrives as XML. The standard c++ libraries don't cover this, so I looked around for how other people do it. The Poco libraries stood out as covering a wide range of useful additional libraries. They are open-source so people should be fairly happy. smiley

I have used the Poco XML SAX library to extract the OSM data into custom, simple objects. I'm fairly happy with this, it runs very quickly, the memory management is simple, but the documentation took me a few hours of head scratching to understand how to use the classes. I'm still not sure that I have used SAX the way it is intended. I used the Poco HTTP classes to access data from the API server and it worked first time.

Now I want to do some tile handling ...

  • Comments(1)//