OpenStreetMap

Debian

Posted by Chris Baines on 2 April 2014 in English.

Debian is a free operating system, but it is a bit more than that as it also provides lots of packages, most of which are precompiled software. There is also lots of software in Debian, that relates to OSM (JOSM, mapnik, osm2pgsql, …), and some software that is not (mod_tile, tilemill, …).

One of my long term goals is for it to be possible to install an OpenStreetMap tileserver on a Debian system with a single command. The user would install a metapackage via the package manager, which then depends on all the components needed (mod_tile, postgresql, apache, …), and then be asked the relevent questions (what data, …) by debconf (the Debian Configuration system).

Unfortunately, this is a long term goal, as several not insignificant things need to happen first. The first probably being getting mod_tile packaged for Debian, as I currently understand, this is blocking on iniparser (which is not in Debian) being used in mod_tile.

In the short term however, there is now some hopefully comprehensive documentation on building a tileserver with Debian up on the Debian wiki. It should not have too many bugs, as I ran through the whole guide twice while writing it. Some bits still need doing, for example, this guide only covers jessie (the current testing release), and it does not cover getting a slippy map (with leaflet, openlayers, …) setup.

Location: Westwood Park, Bevois Town, Southampton, England, SO17 1DY, United Kingdom

Discussion

Comment from Stalfur on 3 April 2014 at 01:01

Looks good, edging closer to installing own tileserver one day.

Comment from amm on 3 April 2014 at 03:29

I would love to see mod_tile in debian as well and I think it would be very useful to make it easier for people to install their own tileserver.

I have done something like you suggest for Ubuntu in my PPA, but it doesn’t fulfill the more stringent criteria of getting it into the official repositories. Partly it was due to the fact that the package install scripts did too much magic to simplify the standard set up, but yes the issue with iniparser also remains an issue to get it into debian. As I understand debian doesn’t want to include a iniparser package in its repository, iniparser would have to be replaced with something else in mod_tile/renderd.

Would this be something you are willing to help with? That would be great!

Comment from Chris Baines on 3 April 2014 at 09:53

Replacing iniparser in mod_tile is something I would like to help with/do, I had a talk with someone actually involved with development a while back who said this would not be too hard.

Some unanswered questions remain though, would switching config file format be an option (e.g. to something like YAML), and what library to replace iniparser with (I found a few I think when I looked previously, but I don’t do too much c/c++ development so I had trouble telling between them).

Comment from amm on 3 April 2014 at 16:23

Although I haven’t done much on mod_tile recently, I am currently the maintainer of the project (for a lack of anyone else). So I would be very much interested in working with you to get this done.

Changing the format of the config file is an interesting question. The current one is definately rather limited and particularly with respect to the (nested) storage backends is limiting and lacking. So moving to a more expressive / hierarchical format is possibly a good idea. A json or yaml format would probably be the way to go in that case as that seems to be what most people use these days. On the otherhand, that would break backwards compatibility and people would have to re-write their config files in order to upgrade.

Nevertheless, at this point it might be worth doing it though, particularly if the config file could automatically be upgraded.

With regard to which library to use, I am not sure. I haven’t looked at any other ones and which are advantages and disadvantages they have.

Given it is a fairly small and simple piece of functionallity, using an “as standard library” as possible would be good to ensure it isn’t hard to install that dependency on most platforms.

Comment from Chris Baines on 3 April 2014 at 17:28

Would it be an option here to write an external tool to upgrade the config file? This could be in some portable language (python?), to make it easy to write and run.

This would then allow for changing mod_tile to use something like yaml-cpp, with a yaml config file.

Log in to leave a comment