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

Hi all,

Slightly similar to another question I've already asked, but I think it deserved it's own thread. I am running the below to import a Europe PBF to PostGIS. But I actually only need the building polygons (planet_osm_polygons). Is there a way to only import that table and skip the others? (and would doing so have a detrimental effect?)

osm2pgsql -d osm_europe --style openstreetmap-carto/openstreetmap-carto.style -U james -H localhost --hstore --slim -G europe-latest.osm.pbf

I've seen some examples of doing this using osmosis I think, but I've struggled getting that running, so think I'd like to stick to osm2pgsql . I guess I can always delete the tables I don't need afterwards, but it'd be nice to not import them in the first place.

asked 19 Apr '18, 10:19

TheRealJimShady's gravatar image

TheRealJimShady
16225
accept rate: 0%


Perhaps could you appky tge blackhole_fdw triggers from Andrew Dunstan https://bitbucket.org/adunstan/blackhole_fdw and use the --append option.

Or else, if you decide to modify osm2pgsl, there are only 4 or 5 lines of code to comment.

Note that there are also 7 to 8000 (geo-) lines with the correct buildings tags.

permanent link

answered 11 May '18, 02:25

AntaC's gravatar image

AntaC
13115
accept rate: 0%

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:

×165
×134
×75
×1

question asked: 19 Apr '18, 10:19

question was seen: 1,907 times

last updated: 11 May '18, 02:25

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