Here is a patch for osm2pgrouting to import more then one file.
How to install
1. svn checkout -r 352 http://pgrouting.postlbs.org/svn/pgrouting/tools/osm2pgrouting/trunk osm2pgrouting
2. download the patch
3. cd into osm2pgrouting
4. patch -p0 -i append.patch
5. make
How to Use:
for the first file :
osm2pgrouting -clean
for other files (except last)
osm2pgrouting -append
for the last file
osm2pgrouting -append -finalize
How it works:
you have to split a large osm file with osmosis like this way (the boundingboxes must overlap on all sides, maybe 0.1°)
./osmosis --read-xml europe.osm --bb left=14.0 right=14.6 top=48.5 bottom=47.8 --write-xml ./1116.osm
./osmosis --read-xml europe.osm --bb left=14.5 right=15.1 top=48.5 bottom=47.8 --write-xml ./1117.osm
or use osmosis with parameter --bb completeWays="yes", with no overlapping but splitting may take longer... its not testet
you can also define the boundingboxes for osmosis in a file like explained here http://wiki.openstreetmap.org/wiki/Osmosis/Examples
this patch also adds the original osm id to the ways table, and it adds the filename of the imported file
Attachments
- append.patch (90.1 KB) - added by ole 11 months ago.