上面“cmake ..”如果报“Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY_DIRS”之类的,
上面语句出现错误“Node cache size is too small to fit all nodes. Please increase cache size”,
bash-4.2$ osm2pgsql --create --database chinaosm -C 5000 /tmp/china-latest.osm.pbf
osm2pgsql version 0.96.0 (64 bit id space)
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 dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=5000MB, maxblocks=80000*65536, allocation method=3
Reading in file: /tmp/china-latest.osm.pbf
Using PBF parser.
Processing: Node(57980k 2520.9k/s) Way(4236k 17.36k/s) Relation(48000 46.02/s) parse time: 1311s
Node stats: total(57980764), max(5734941590) in 23s
Way stats: total(4236740), max(604382393) in 244s
Relation stats: total(48052), max(8423110) in 1044s
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads
Using built-in tag processing pipeline
Going over pending ways...
1709004 ways are pending
Using 1 helper-processes
Finished processing 1709004 ways in 916 s
1709004 Pending ways took 916s at a rate of 1865.72/s
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads
Going over pending relations...
0 relations are pending
Using 1 helper-processes
Finished processing 0 relations in 0 s
Committing transaction for planet_osm_point
警告: 没有事物在运行中
Committing transaction for planet_osm_line
警告: 没有事物在运行中
Committing transaction for planet_osm_polygon
警告: 没有事物在运行中
Committing transaction for planet_osm_roads
警告: 没有事物在运行中
Sorting data and creating indexes for planet_osm_point
node cache: stored: 57980764(100.00%), storage efficiency: 50.42% (dense blocks: 438, sparse nodes: 55701723), hit rate: 100.00%
Copying planet_osm_point to cluster by geometry finished
Creating geometry index on planet_osm_point
Creating indexes on planet_osm_point finished
All indexes on planet_osm_point created in 64s
Completed planet_osm_point
Sorting data and creating indexes for planet_osm_line
Copying planet_osm_line to cluster by geometry finished
Creating geometry index on planet_osm_line
Creating indexes on planet_osm_line finished
All indexes on planet_osm_line created in 451s
Completed planet_osm_line
Sorting data and creating indexes for planet_osm_polygon
注意: Self-intersection at or near point 13317174.283909315 3548338.7420334821
注意: Self-intersection at or near point 11985875.572086383 4115611.18050856
Copying planet_osm_polygon to cluster by geometry finished
Creating geometry index on planet_osm_polygon
Creating indexes on planet_osm_polygon finished
All indexes on planet_osm_polygon created in 252s
Completed planet_osm_polygon
Sorting data and creating indexes for planet_osm_roads
Copying planet_osm_roads to cluster by geometry finished
Creating geometry index on planet_osm_roads
Creating indexes on planet_osm_roads finished
All indexes on planet_osm_roads created in 125s
Completed planet_osm_roads
Osm2pgsql took 3861s overall
bash-4.2$