omniscale / imposm2

Imports OpenStreetMap data into geo databases
http://imposm.org
Apache License 2.0
116 stars 24 forks source link

Imposm should check its DB connection prior to importing data #25

Closed llimllib closed 11 years ago

llimllib commented 11 years ago

It sucks to lose a 4-hour planet import because you specified the wrong postgres port; it would be much better if imposm would warn you when it starts that it can't connect to your postgres database.

I'd be willing to code this feature if you agree that it would be nice; what do you guys think?

olt commented 11 years ago

You could restart the import without the --read option to safe 4-hours, but I guess this hint comes to late. A check would be great. I would add a check_connection method to the PostGIS database class and call it in the main function before starting the read process (but only when --write is set).

llimllib commented 11 years ago

Hah, I... didn't even consider that. Doh and Thanks.

Will add the check, anyway, see if I can make it useful.

llimllib commented 11 years ago

https://github.com/omniscale/imposm/pull/26

llimllib commented 11 years ago

Also https://github.com/omniscale/imposm/pull/27/files