osm4routing icon indicating copy to clipboard operation
osm4routing copied to clipboard

Writing to PostGIS database from large osm file

Open godosou opened this issue 13 years ago • 1 comments

My environment:

Mac OS leopard, i3 CPU, 4G RAM, python2.6. I tested with a small network (Lausanne city). It was successful in less than 1 minute. However, when I run for the whole Switzerland, the program seems stopped doing anything after creating nodes and edges table in the database. No writing any record to the database at all in 20 hours.

Thank you.

Following is the log that I got.

osm4routing -o postgresql://jchen@localhost:5433/osm -n osm_nodes -e osm_edges -s switzerland.osm Supposing OSM/xml file Step 1: reading file /Users/jchen/Documents/Project/biogeme/newbioroute/network/osmosis-0.39/bin/switzerland.osm I don't know what to do with: foot=private I don't know what to do with: bicycle=lane I don't know what to do with: bicycle=mtb I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=prioritaire I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=dismount I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=no;under_construction I don't know what to do with: foot=private I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=unknown I don't know what to do with: foot=private I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=dismount I don't know what to do with: bicycle=dismount I don't know what to do with: bicycle=dismount I don't know what to do with: foot=private I don't know what to do with: bicycle=0 I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=unknown I don't know what to do with: foot=private I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=yes¨ I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=opposite I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=steps I don't know what to do with: foot=desigated I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=bridge I don't know what to do with: foot=bridge I don't know what to do with: bicycle=unknown I don't know what to do with: foot=official I don't know what to do with: foot=steps I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=yes; permissive I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=undefined I don't know what to do with: foot=private I don't know what to do with: foot=undefined I don't know what to do with: foot=undefined I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=undefined I don't know what to do with: foot=private I don't know what to do with: foot=steps I don't know what to do with: bicycle=official I don't know what to do with: foot=undefined I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=undefined I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=unknown I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=official I don't know what to do with: foot=service I don't know what to do with: foot=service I don't know what to do with: foot=service I don't know what to do with: foot=service I don't know what to do with: foot=service I don't know what to do with: foot=service I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=ëes I don't know what to do with: foot=unknown I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=unknown I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=undefined I don't know what to do with: foot=undefined I don't know what to do with: foot=official I don't know what to do with: foot=p I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=private I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=p I don't know what to do with: foot=p I don't know what to do with: foot=p I don't know what to do with: foot=official I don't know what to do with: foot=p I don't know what to do with: foot=p I don't know what to do with: foot=p I don't know what to do with: foot=p I don't know what to do with: foot=p I don't know what to do with: foot=p I don't know what to do with: foot=p I don't know what to do with: foot=private I don't know what to do with: bicycle=unknown I don't know what to do with: foot=p I don't know what to do with: foot=official I don't know what to do with: foot=private I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: bicycle=dismount I don't know what to do with: bicycle=dismount I don't know what to do with: bicycle=dismount I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: bicycle=official I don't know what to do with: bicycle=official I don't know what to do with: foot=official I don't know what to do with: foot=official I don't know what to do with: bicycle=dismount I don't know what to do with: bicycle=dismount I don't know what to do with: bicycle=dismount I don't know what to do with: foot=official I don't know what to do with: bicycle=dismount I don't know what to do with: bicycle=unknown Read 7570070 nodes and 871703 ways

Step 2: saving the nodes

godosou avatar Jul 19 '11 12:07 godosou

Hi,

I got the solution myself. I changed the code such that the program commit once every 1000 records. Following is the code that I added to osm4routing.py before line 153. Also I need the original osm_id for each edge record, I also changed the code. Is it possible to commit my version? Thanks.

    if count%1000==0:
        print count
        session.commit()

godosou avatar Jul 19 '11 15:07 godosou