omniscale / imposm3

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

diff insert postgis afther importing #39

Closed benjamin-rty closed 10 years ago

benjamin-rty commented 10 years ago

With the lastest imposm3

I have downloaded andorra datum 2014-07-02 and this osc.gz / state.txt from geofabrik.

FIRST I do an import of andorra datum 2014-07-01 20:22:02 (this 'state' is 481)

command =

imposm3 import \ -connection postgis://[user]:[ww]@[pc]/[database]?sslmode=disable \ -overwritecache \ -mapping mapping_imposm3.json \ -read andorra-140701.osm.pbf \ -diff \ -write \ -deployproduction

log =

[Sep 15 14:12:45] [INFO] removing existing cache /tmp/imposm3 [Sep 15 14:12:45] [INFO] [reader] reading andorra-140701.osm.pbf with data till 2014-07-01 20:22:02 +0000 UTC [Sep 15 14:12:46] [INFO] [ 0] C: 0/s (85082) N: 0/s (0) W: 0/s (3616) R: 0/s (13) [Sep 15 14:12:47] [INFO] [ 1s] C: 0/s ( 0.0%) N: 0/s (0) W: 0/s (100.0%) R: 0/s (100.0%) ... [Sep 15 14:12:50] [INFO] [PostGIS] Rotating tables took: 83.570506ms [Sep 15 14:12:51] [INFO] Imposm took: 18.741696841s

Then I try to add a diff (I have downloaded the osc.gz and the state.txt file. The last.state.txt is the 481.state.txt )

command =

imposm3 diff \ -connection postgis://[user]:[ww]@[pc]/[database]?sslmode=disable \ -mapping mapping_imposm3.json \ deltas/482.osc.gz

log =

[Sep 15 14:14:00] [WARN] [diff] Diff #482 from 2014-07-02 20:22:01 +0000 UTC already imported

And thats not possible, the latest date is 2014-07-01 20:22:02 (see import)

What Do I wrong ?

Kind regards, Benjamin

olt commented 10 years ago

Sorry for the late reply, but maybe someone else stumbles on this issue. You need to check last.state.txt, that's where Imposm keeps track of the last imported diff file. It tries to guess the right sequence number after the first import, but that can be off some times. Just change the sequence in that file.

benjamin-rty commented 9 years ago

Thanks !