I'm trying to import the OSM sample data from Mastering PostGIS, Chapter 1. I'm on Windows and am using this x64 binary (v1.4.0) I found here.
The call is as in the book
osm2pgsql -H localhost -P 5432 -U postgres -W -d mastering_postgis -S default.style "c:\Users\grego\OneDrive\..\data\greenwich_observatory\greenwich_observatory.osm" -hstore
The error I'm getting is
2020-12-22 10:23:49 osm2pgsql version 1.4.0 osm2pgsql: unknown option -- t
2020-12-22 10:23:49 ERROR: Usage error. For further information call: osm2pgsql --help
Version info is this:
osm2pgsql version 1.4.0
Compiled using the following library versions:
Libosmium 2.15.6
Proj [API 4] Rel. 4.9.3, 15 August 2016
Lua 5.3.4
Any help would be much appreciated.
You're missing a - in --hstore
. With a single dash, it processed -h and -s which exist but it didn't know what to do with -t.