Revision 189, 1.0 KB
(checked in by murray, 2 years ago)
|
osm2pgrouting: add a new tool to this project, which converts and imports osm data to a pgrouting
table
|
Line | |
---|
1 | Before you can use this tool for importing Openstreetmap data, |
---|
2 | you need to install |
---|
3 | |
---|
4 | 1. postgresl |
---|
5 | 2. postgis |
---|
6 | 3. pgrouting |
---|
7 | |
---|
8 | and to prepare a database. |
---|
9 | |
---|
10 | See in the documentation of the pgrouting website for more informations: |
---|
11 | http://pgrouting.postlbs.org/ |
---|
12 | |
---|
13 | For compiling this tool, you will need boost, libpq and expat: |
---|
14 | Then just type: make |
---|
15 | |
---|
16 | |
---|
17 | Start the program like this: |
---|
18 | |
---|
19 | ./main -file your-OSM-XML-File.osm -dbname routing -user postgres |
---|
20 | |
---|
21 | all available parameters are: |
---|
22 | |
---|
23 | required: |
---|
24 | -file <file> -- name of your osm xml file |
---|
25 | -dbname <dbname> -- name of your database |
---|
26 | -user <user> -- name of the user, which have write access to the database |
---|
27 | optional: |
---|
28 | -host <host> -- host of your postgresql database (default: 127.0.0.1) |
---|
29 | -port <port> -- port of your database (default: 5432) |
---|
30 | -passwd <passwd> -- password for database access |
---|
31 | |
---|
32 | |
---|
33 | Be careful: |
---|
34 | This program exports only following streettypes: |
---|
35 | motorway, primary and secondary |
---|
36 | For all streets, remove the flag -DRESTRICT in the Makefile |
---|
37 | or modify the restriction in the OSMDocumentParserCallback.cpp |
---|