NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

0
1

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

RicoElectrico
37161117
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 ♦
82.5k927201273
accept rate: 23%

Follow this question

By Email:

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

By RSS:

Answers

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:

×263
×134

question asked: 17 Sep '16, 01:29

question was seen: 2,394 times

last updated: 17 Sep '16, 01:41

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum