Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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!

share|improve this question
    
What Operating System are you going to use? –  Mapperz Jun 20 '11 at 13:51
    
@Mapperz I edited my post with the informations you ask. Sorry, I forgot to talk about that :/ –  Rootosaurus Jun 20 '11 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 '11 at 14:15
    
I don't think so... but I will try... :D –  Rootosaurus Jun 20 '11 at 14:47
add comment

4 Answers

up vote 5 down vote accepted

Straight Forward Guide to Setting Up OSM with PostGIS and MapNik

http://www.hyperionreactor.net/blog/how-build-your-own-osm-server-part-1-postgis-and-mapnik

and when ready

http://www.hyperionreactor.net/blog/how-build-your-own-map-service-part-2-auto-updating-your-database

share|improve this answer
    
Thank you for those great articles. –  Rootosaurus Jun 20 '11 at 14:32
    
@Mapperz Page not found, can you update the links please –  D.Rosado Jul 26 '12 at 13:19
    
Use the Webachive (Wayback machine) to view these links - I am not the site administrator - web.archive.org/web/20101013035221/http://… –  Mapperz Jul 26 '12 at 13:33
add comment

This is a new resource that is very useful:

http://switch2osm.org/

share|improve this answer
add comment

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).

share|improve this answer
add comment

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.

share|improve this answer
    
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? –  Rootosaurus Jun 20 '11 at 13:37
    
I never got osmosis to do anything useful before I ran out of time and moved on to other things. –  iant Jun 20 '11 at 14:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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