[Tile-serving] [openstreetmap/osm2pgsql] Import history files? (#1087)

Steffen Exler notifications at github.com
Mon Mar 9 14:42:43 UTC 2020


How would it be possible to import osh (History fiels) and keep every version in the database?
I'm trying to import the osm [planet file](https://planet.openstreetmap.org/planet/full-history/) with the complete history in an [osm2pgsql schema](https://wiki.openstreetmap.org/wiki/Osm2pgsql/schema) and render it with mapnik. 

I've tried already to download the history file of Berlin via Geofrabrik and when I used to import:
```
osm2pgsql -G --hstore --slim --drop --multi-geometry  \
    --extra-attributes \
    --keep-coastlines \
    --style openstreetmap-carto.style \
    --tag-transform-script openstreetmap-carto.lua \
    berlin-internal.osh.pbf
```

The style & lua file is from [openstreetmap-carto](https://github.com/gravitystorm/openstreetmap-carto)

```
Reading in file: /home/fubu/berlin-internal.osh.pbf
Using PBF parser.
COPY_END for COPY planet_osm_nodes FROM STDIN;
 failed: ERROR:  duplicate key value violates unique constraint "planet_osm_nodes_pkey"
DETAIL:  Key (id)=(172539) already exists.
CONTEXT:  COPY planet_osm_nodes, line 2
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1087
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200309/dc46b314/attachment.htm>


More information about the Tile-serving mailing list