Why not ask your question on the new OpenStreetMap Community Forum?


How does osm2pgsql slim mode work if I want to import the planet and my schema discards most objects? Does it still need every single node to be stored? (I think so because diffs carry no child object info, so if not all nodes of a way are modified it would need to pull the rest from somewhere - the slim nodes table)

Also, is the amount of processing time during the initial import still substantial due to how it processes data sequentially, even if the resulting table is going to be small in size?

In other words, does osm2pgsql scale down well for schemas that would only import a low number of objects - like keeping a table of POI? Or should I use osmfilter beforehand?

asked 17 Sep '16, 01:29

RicoElectrico's gravatar image

accept rate: 0%

edited 17 Sep '16, 01:40

You are correct, even if you discard most objects, osm2pgsql in slim mode needs to store all ways and relations with their tags and connections, as well as all node coordinates. (It does not have to store all node tags.)

If you don't need updates, you can use --slim --drop to reduce resource usage somewhat but it will still take a while. Filtering data with osmosis or osmfilter before you import with osm2pgsql will certainly speed things up in this scenario.

permanent link

answered 17 Sep '16, 01:41

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

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: 17 Sep '16, 01:29

question was seen: 2,287 times

last updated: 17 Sep '16, 01:41

powered by OSQA