Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the original osm id to the ways table, and it adds the filename of the imported file #1

Closed
dkastl opened this issue Nov 11, 2010 · 0 comments

Comments

@dkastl
Copy link
Member

dkastl commented Nov 11, 2010

Note: This has been posted on the pgRouting TRAC wiki. Since I'm not sure it has been applied to the source code, I post it as a ticket:


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

@dkastl dkastl closed this as completed Jun 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant