Hello everyone, i have this problem with Osm2pgsql, i use linux mint 18.4 32bit with 3GB RAM, Processeur intel Centrino, osm2pgsql -d gis --create --slim -G -hstore --tag-transform -script ~/src/openstreetmap-carto/openstreetmap-carto.lua -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/madagascar-latest.osm.pbfosm2pgsql SVN version 0.88.1 (64bit id space) osm2pgsql: invalid option -- 't' Osm2pgsql failed due to ERROR: Usage error. For further information see: osm2pgsql -h|--help how can i do? thanks, asked 07 Dec '19, 11:00 Jacquinot |
Do you have a space between "--tag-transform" and "-script" in your call? It should be "--tag-transform-script" without a space. I also see that you are using a really old version and I'm not sure about the options offered in version 0.88. I would advise to use a newer version from https://www.github.com/openstreetmap/osm2pgsql answered 07 Dec '19, 11:44 Spiekerooger |
So it does look as if you are using options that are not provided in this old version of osm2pgsql. If you would do a "osm2pgsql -h" you would see the options available for version 0.88. I strongly recommend to use a newer version (see my answer above) to have lua scripting included as well as hstore options. answered 07 Dec '19, 14:10 Spiekerooger so i remove the old version of osm2pgsql and i install the new version !!
(07 Dec '19, 14:17)
Jacquinot
|
i have i new problem after installation: osm2pgsql -d gis --create --slim -G -hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/madagascar-latest.osm.pbf bash: /usr/bin/osm2pgsql: No such file or directory answered 07 Dec '19, 15:16 Jacquinot 1
Sounds like osm2pgsql is not installed where they are expected. You do need some Linux knowledge to get this working.
(07 Dec '19, 21:11)
Spiekerooger
|
now i have this: # osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua -C 2500 --number-processes 1 -S ~/src/openstreetmap-carto/openstreetmap-carto.style ~/data/madagascar-latest.osm.pbf osm2pgsql version 1.2.0 (64 bit id space) Allocating memory for sparse node cache Node-cache: cache=2500MB, maxblocks=40000*65536, allocation method=9 Mid: pgsql, cache=2500 Connection to database failed: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? Connection to database failed: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? DB writer thread failed due to ERROR: Connecting to database. answered 10 Dec '19, 16:29 Jacquinot |
Run this command to see what version(s) of PostgreSQL are running as well as their ports, statuses & data directories: $ pg_lsclusters If you are running PostgreSQL on a port other than 5432, many of the commands you use require the option '-p <port number="">'. answered 27 May '20, 12:35 TimothyOnline |