When using osm2pgsql in a script to regularly update my osm database i’m always asked for the password. Is it possible to omit this so i can rund the script by a nightly cron job? Or maybe can i pass the password to osm2pgsql in the script?
I would do this, but i’m not that firm in programming with C.
I’m just happy that i found the source to change for disabling the password prompt. So this works for me on my local machine.
I changed the following in osm2pgsql.c: (it’s about on line 540)
It would be nice to have osm2pgsql for Windows maintained somehow. It is now 6 months old and lacks a few nice new features, for example reading list of tags to be imported from a file etc. But perhaps I am the only Windows handicapped user here. In addition, Windows specific source code was never put to OSM trac so it is hard to maintain even somebody gets interested.
You could try to run that program under linux instead. Download cooperative Linux, which allows you to run Linux under Windows XP (perhaps vista) without emulation. It worked fine for me in ~2004 so I think it should be even better now.