naaas
naaas

Reputation: 47

osm2pgsql windows "illegal option -W" error

tI'm trying to import map data into a postgis DB on windows. I've doing this for years using osm2pgsql but the latest update of Spain map generates a duplicate key error. It seems to be a 64 bit version issue. Is there a way to avoid this problems? I tried to sort it first using osmosis but i get the same error.

Another question. I downloaded new osm2pgsql version (February 6, 2013) and i can't make it work. It shows "illegal option --w". I use the following (which allways worked with previous versions)

 "osm2pgsql -c -d osm  -s  -S C:\sw\osm2postgre\default.style -U postgres -W -H localhost -P 5432 c:\mapas\spain.osm.bz2"

Upvotes: 2

Views: 3496

Answers (1)

Yair Morgenstern
Yair Morgenstern

Reputation: 146

The new version doesn't allow you to insert your password with -w, instead you have to set your password into the environment variable pgpassword before running osm2pgsql, like so:

SET pgpassword=postgres

For example.

Upvotes: 9

Related Questions