omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
709 stars 156 forks source link

beginners friendly "import everything" #228

Open ulutomaz opened 4 years ago

ulutomaz commented 4 years ago

Hello,

sorry for asking this, but I have been struggling with documentation and various imports, but can't seem to find a mapping configuration to simply import everything from osm.pbf file into PostGIS.

It is really hard for a newcomer to even know what exactly to select as a source for mapping. I just want all.

I found any : [any ] and "load_all", but the example for that kind of mapping.json would be so helpful.

BR, Tomaz

Miroff commented 4 years ago

I'm using this mapping:

tags:
  load_all: true
  exclude: [created_by, source]

tables:
  all:
    type: geometry
    columns:
      - name: osm_id
        type: id
      - name: tags
        type: hstore_tags
      - name: geometry
        type: geometry
    type_mappings:
      points:
        __any__: [__any__]
      linestrings:
        __any__: [__any__]
      polygons:
        __any__: [__any__]