请使用Windows Osm2pgsql解决将OSM数据库导入Postgresql时遇到的错误。
命令和日志如下所示
C:\osm2pgsql-bin>osm2pgsql osm.pbf -s -c -d suhas -U suhas -W Oracle@123 -H localhost -P 5432 -r pbf -S default.style
osm2pgsql version 0.96.0 (64 bit id space)
Password:
Using built-in tag processing pipeline
Using projection SRS 3857 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Allocating memory for sparse node cache
Node-cache: cache=800MB, maxblocks=12800*65536, allocation method=9
Mid: pgsql, cache=800
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Reading in file: osm.pbf
Using PBF parser.
Processing: Node(81188k 339.7k/s) Way(10632k 69.95k/s) Relation(42710 225.98/s) parse time: 580s
Reading in file: Oracle@123
Using PBF parser.
node cache: stored: 52428801(64.58%), storage efficiency: 50.00% (dense blocks: 0, sparse nodes: 52428801), hit rate: 72.73%
Osm2pgsql failed due to ERROR: Open failed for 'Oracle@123': The system cannot find the file specified.
答案 0 :(得分:1)
使用命令osm2pgsql osm.pbf -s -c -d suhas -U suhas -W -H localhost -P 5432 -r pbf -S default.style