I make my first steps in the GIS world and everything is very new for me even if I work on a "huge" project (ie: for a single programmer) very related to maps.

My project needs to know informations below for any location of the world:

  • Road type
  • Road name
  • Road coordinates
  • City boundaries
  • Water way name
  • Water way coordinates

I found that I could have all this informations thanks to Open Street Map and my project begins to work thanks to this. But now I need to work on bigger maps (ie: bigger than the 50.000 XML nodes limit OSM export provides). I know I need to put the whole planet in a database.

There is a lot of documentation about PostgreSQL and Open Street Map on the Internet but I don't know where to begin. In fact I found documentation about Osmosis in order to put a planet dump in a database, but I also found about osm2pgsql. The point is I don't know what is the best for me.

It seems (but I can be wrong) osm2pgsql has been made in order to render mapnik maps, thing I don't need at all because I have to know roads/cities/water ways informations... But I am not sure to have correctly understood what mapnik can do.

My question is: What can I use to insert OSM datas in a database in order to reuse it later as easily as an OSM exported file?

Thank you.

EDIT: The computer I use is a dedicated server (Intel(R) Pentium(R) E2180 2.00GHz and 2GB of RAM) running a GNU/Linux Debian.

PS: I know my question seems dumb, because osmosis can insert but also extract a xml file from a database. Anyway, I need to know how you would do it.

PS: If someone knows where to find nice OSM+database tutorials for beginner I would appreciate!

  • What Operating System are you going to use?
    – Mapperz
    Jun 20, 2011 at 13:51
  • @Mapperz I edited my post with the informations you ask. Sorry, I forgot to talk about that :/
    – lvictorino
    Jun 20, 2011 at 13:57
  • 1
    Can you bump up your RAM to 8GB? - your find 2GB a bit clunky for rendering. hyperionreactor.net/blog/…
    – Mapperz
    Jun 20, 2011 at 14:15
  • I don't think so... but I will try... :D
    – lvictorino
    Jun 20, 2011 at 14:47

4 Answers 4


Straight Forward Guide to Setting Up OSM with PostGIS and MapNik


and when ready



You can read about my experiences importing OSM data into PostGIS at http://ian01.geog.psu.edu/geoserver_docs/data/openstreetmap/index.html. I also discuss displaying the data using GeoServer.

  • Hey thank you for the url (and thank you for sharing your experiences to the world). You say that osm2pgsql seemed to take too much time for you but you don't say how much time it took when you ran osmosis. Do you remember how long it was?
    – lvictorino
    Jun 20, 2011 at 13:37
  • I never got osmosis to do anything useful before I ran out of time and moved on to other things.
    – Ian Turton
    Jun 20, 2011 at 14:03

I used osmosis following the instructions on the wiki. Despite being unsure of what I was doing, it was quite straightforward.

Using a computer with 4GB of ram it took about 4 hours to extract singapore from the entire globe. I asked a question on the OSM help forum about this too.

The extract of the globe can be then opened in QGIS, and it cna be saved as a shapefile if that is useful (a shapefile is a more standard way of representing spatial information than the OSM XML format).


This is a new resource that is very useful:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.