Hello, I have to learn how to make maps using OSM data. The data will be in held in a PostGIS database and my role in the project is to learn how to take this data and make pretty maps using Mapnik, store the tiles and use something to make slippy maps that can be accessed by the public for free via a web server. In order to fully understand / get to grips with my end I thought I had better learn / get familiar with the whole process. To the end I have done the following: - I have installed the OSGeo live version 5 bundle on a virtual machine on my PC. I believe this means it is running in ubuntu. - Then downloaded United_Kingdom.shapefiles.zip, unzipped and used QGIS to make the shape file go into an sql database (PostGIS). - I think I then access mapnik through a terminal thing a bit like when you want to run command lines through dos. There doesn’t seem to be another way that I could see? I am sorry if I sound like a bit of an idiot, but I don’t really understand what Mapnik is, I thought it was going to be something like ArcGIS or Mapinfo, both of which I’ve seen before. Anyway, I followed some instructions using something they called “python bindings” and managed to get my .shp files to make maps in the .png format. I have some instructions on how I can make that ‘executable’ – whatever that means?

But I need to be able to make these maps from data in the PostGIS database, and I can’t seem to figure out how to do that. I have tried some code copied off OSMwiki, but that didn’t work. Someone has suggested that Mapnik maybe doesn’t know how to read from PostGIS and told me to type ‘registered datasource : postgis’ but I got ‘registered : command not found’ and I don’t even know what that means!

I have been using this OSGeo thing as it came; I have not installed or uninstalled anything else. I am sorry if I am asking help on something really basic and potentially obvious, I don’t come from a computer background and I think I am out of my depth!!

Manythanks TM

asked 20 Feb '12, 11:34

OSM-GB's gravatar image

accept rate: 0%

You are asking many things at the same time. A single answer in this forum will probably not elevate you from your current position ("not from a computer background and out of your depth") to where you would like to be ("take this data and make pretty maps"). I see a serious learning curve ahead of you that will definitely include some study of our wiki!

A few pointers:

  • Serious OSM map makers never use shape files; they use osm2pgsql or imposm to convert OSM data directly to PostGIS (see wiki for both).
  • Don't start out with the whole of the UK. Download a county only and play with that: http://download.geofabrik.de/osm/europe/great_britain/england/
  • If you are looking for a large area and/or lot of detail then you will not be able to simply "produce and store tiles"; you will have to set up a "tile server" that computes them on demand.
  • If your intent is to create your own map style, then you might want to have a look at the TileMill software which simplifies the round-trip times during style development, and which is capable of producing a Mapnik style file at the end.
  • Some software installation is very likely required so at the very least you will have to install that OSGeo DVD in a way that allows you to add packages.
permanent link

answered 20 Feb '12, 11:55

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 24%


I'd also suggest reading some linux primer if you've only ever used Windows or MacOSX. A quick googling gave me http://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything but googling for "linux", "command-line", "ubuntu", "primer", "tutorial" etc will give you more.

Approach your problem in separate phases, not worrying about the next phase until you've got the current foundation right :

  • understand the VM you've downloaded

  • get some osm data into a postgres db

  • setup mapnik to render the data

  • setup a slippymap to display the rendered data

(20 Feb '12, 12:16) Vincent de P... ♦

I'd suggest that the best tutorial if you want to understand the process of creating an OSM-style slippy map like the main page based on data in a local PostGIS database is probably this one. The reason why I'd recommend it is that it starts with a standard download of Ubuntu Linux, and goes through the process of installing and configuring the necessary software until you've got a working tile server.

Most of the instructions are copy-and-pasteable from the page, but they still do require some familarity with Linux (particularly Ubuntu Linux) - how to install it into a virtual machine, how to stop it and start it, how to edit files, etc. Ubuntu's a good choice to base this tutorial around as it's probably the best documented Linux distribution out there - if you do a web search for "ubuntu edit file" you'll get half a dozen HOWTOs on the first page.

So, I'd get started and then when you have a specific problem (e.g. "I'm following XYZ instructions when I type ABC it gives me an error message DEF instead of the desired result") ask back here (or perhaps on IRC) - someone will be able to help.

permanent link

answered 20 Feb '12, 21:04

SomeoneElse's gravatar image

SomeoneElse ♦
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Feb '12, 11:34

question was seen: 5,105 times

last updated: 20 Feb '12, 21:04

powered by OSQA