1

I wanted to know if there was a way to import a node.cache file, containing a planet file, after osm2pgsql has crashed because of connection timed out error?

I don't want to launch again the tool and wait for the full extraction to run once more. I used the --slim mode with the --flat-nodes mode and provided a location where to store the node.cache file. It was created nicely but during the commit to database phase, osm2pgsql throws an error because the connection timed out.

I'm using : PostgreSQL 9.6.5 | PostGIS 2.4.0 | Debian Stretch

Here's the verbose output of the tool :

user@woopdidoo:~$ osm2pgsql -c -H host -P port -d postgres -U postgres -W --slim -C 4608 --flat-nodes node.cache ways_north_america.osm.pbf
osm2pgsql version 0.92.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 dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=4608MB, maxblocks=73728*65536, allocation method=11
Mid: loading persistent node cache from node.cache
Allocated space for persistent node cache file
Maximum node in persistent node cache: 0
Mid: pgsql, scale=100 cache=4608
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file: ways_north_america.osm.pbf
Using PBF parser.
Processing: Node(199609k 364.9k/s) Way(20842k 11.98k/s) Relation(80 80.00/s)Maximum node in persistent node cache: 5234491391
node cache: stored: 199609351(100.00%), storage efficiency: 61.93% (dense blocks: 20221, sparse nodes: 78339611), hit rate: 100.00%
Osm2pgsql failed due to ERROR: could not send data to server: Connection timed out
: relations_set - bad result during COPY, data 11723    0   83  {20800929,20801040,20801184,20801189,20801313,20801364,20801453,20801519,20801570,20801624,20801640,20801676,20801852,20801875,20801917,20802267,20802317,20802424,20802463,20802520,20802543,20802761,20802944,20802951,20802958,20803092,20803166,20803257,20803280,20803571,20803629,20803723,20803870,20804078,20804110,20804124,20804170,20804228,20804374,20804721,20804722,20804767,20804781,20804890,20804916,20805056,20805107,20805258,20805262,20805268,20805310,20805314,20805436,20805495,20805504,20805517,20805530,20805609,20805637,20805730,20805732,20805801,20805849,20805937,20806035,20806168,20806224,20806258,20806407,20806490,20806549,20806696,20806883,20807012,20807025,20807079,20807207,20807246,20807337,20807386,24016842,24016843,24250860}    {"w20800929","inner","w20801040","inner","w20801184","inner","w20801189","inner","w20801313","inner","w20801364","inner","w20801453","inner","w20801519","inner","w20801570","inner","w20801624","inner","w20801640","inner","w20801676","inner","w20801852","inner","w20801875","inner","w20801917","inner","w20802267","inner","w20802317","inner","w20802424","inner","w20802463","inner","w20802520","inner","w20802543","inner","w20802761","inner","w20802944","inner","w20802951","inner","w20802958","inner","w20803092","inner","w20803166","inner","w20803257","inner","w20803280","inner","w20803571","inner","w20803629","inner","w20803723","inner","w20803870","inner","w20804078","inner","w20804110","inner","w20804124","inner","w20804170","inner","w20804228","inner","w20804374","inner","w20804721","inner","w20804722","inner","w20804767","inner","w20804781","inner","w20804890","inner","w20804916","inner","w20805056","inner","w20805107","inner","w20805258","inner","w20805262","inner","w20805268","inner","w20805310","inner","w20805314","inner","w20805436","inner","w20805495","inner","w20805504","inner","w20805517","inner","w20805530","inner","w20805609","inner","w20805637","inner","w20805730","inner","w20805732","inner","w20805801","inner","w20805849","inner","w20805937","inner","w20806035","inner","w20806168","inner","w20806224","inner","w20806258","inner","w20806407","inner","w20806490","inner","w20806549","inner","w20806696","inner","w20806883","inner","w20807012","inner","w20807025","inner","w20807079","inner","w20807207","inner","w20807246","inner","w20807337","inner","w20807386","inner","w24016842","inner","w24016843","inner","w24250860","outer"}   {"type","multipolygon","waterway","riverbank"}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.