Hello, after compiling osm2pgsql v1.6.0 and all its requirements, I tried to use it. But it did fail with ERROR: Open failed for 'osm': No such file or directory. where could I find out about the file or directory? osm2pgsql --slim -d gis -C 1600 -H uslamvm3.gre.hpecorp.net -P 5432 --number-process 1 -G --hstore --tag-transform-script ./openstreetmap-carto.lua -S ./openstreetmap-carto.style --log-level=debug -v ./data/gcc-states-140101.osm.pbf 2022-08-16 00:46:32 osm2pgsql version 1.6.0 (1.6.0-244-g65d0d27) Password: 2022-08-16 00:46:34 [0] Database version: 12.11 2022-08-16 00:46:34 [0] PostGIS version: 3.1 2022-08-16 00:46:34 [0] Reading file: osm 2022-08-16 00:46:34 [0] Reading file: ./data/gcc-states-140101.osm.pbf 2022-08-16 00:46:34 [0] Started pool with 1 threads. 2022-08-16 00:46:34 [0] Mid: pgsql, cache=1600 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_nodes' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_ways' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_rels' 2022-08-16 00:46:34 [0] Using projection SRS 3857 (Spherical Mercator) 2022-08-16 00:46:34 [0] Using lua based tag transformations with script ./openstreetmap-carto.lua 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_point' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_line' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_polygon' 2022-08-16 00:46:34 [0] Setting up table 'planet_osm_roads' 2022-08-16 00:46:34 [0] ERROR: Open failed for 'osm': No such file or directory asked 16 Aug '22, 00:25 HoangA |
the error is due to -W... see osm2pgsql-error-trying-to-import-osm-to-postgis-on-aws answered 19 Aug '22, 14:23 HoangA 1
There was no -W in your original query. It really helps if you provide an accurate command line.
(21 Aug '22, 13:35)
SK53 ♦
|
I did check all the input files, and they do exist. looking at code, I do see this error only in: contrib/libosmium/include/osmium/io/detail/read_write.hpp: throw std::system_error{errno, std::system_category(), std::string("Open failed for '") + filename + "'"}; but I don't understand why user "osm" is view as file .. the function "open_for_writing" is called by function in contrib/libosmium/include/osmium/io/writer.hpp: std::unique_ptr<osmium::io::compressor> compressor = CompressionFactory::instance().create_compressor(file.compression(), osmium::io::detail::open_for_writing(m_file.filename(), options.allow_overwrite), options.sync); answered 17 Aug '22, 00:35 HoangA |
I have no idea what is happening: the same command on my own osm2pgsql install complains about the file name " ERROR: Open failed for './data/gcc-states-140101.osm.pbf': The system cannot find the file specified." as I would expect.