@@ -4,19 +4,20 @@ adapted for routing applications.
4
4
== INPUT FORMAT ==
5
5
The input is an OpenStreetMap XML file. The file can be read:
6
6
* from a plain .osm file
7
- * from a bz2 file
8
- * from stdin
7
+ * from a bzip2 file
8
+ * from a gzip file
9
9
10
10
== OUTPUT FORMAT ==
11
11
The output can be:
12
12
* a csv file
13
- * postgis database (geographical extension to postgres).
13
+ * database (postgres, mysql, sqlite, postgis)
14
14
15
15
In both output you'll get two files/tables:
16
16
* nodes that contain
17
17
* id (64 bit integer)
18
18
* longitude (decimal real)
19
19
* latitude (decimal real)
20
+ * geometry (only in postgis)
20
21
21
22
* edges that contain
22
23
* id (64 bit integer)
@@ -58,26 +59,39 @@ The integers mean:
58
59
59
60
== INSTALL ==
60
61
You need:
61
- * the GCC C++ complier (g++)
62
62
* Boost
63
63
* expat (XML parser)
64
- * libbz2 (Bzip2)
65
- * libpq (postgres)
64
+ * python
65
+ * swig
66
66
67
- Run make and it should compile.
67
+ # Create a virtual environment and activate it
68
+ python virtualenv.py env
69
+ source env/bin/activate
70
+
71
+ # Get python dependencies and build the application
72
+ python setup.py develop
73
+
74
+ # Run it
75
+ python parse.py --help
68
76
69
77
70
78
== USAGE ==
71
79
Get the .osm XML file of the region that interests you.
72
80
For limited regions, use the export tools from the web interface.
73
81
For bigger regions you might find what you want at http://download.geofabrik.de/osm/
82
+ Osmosis can help you to have a smaller region from a big dump http://wiki.openstreetmap.org/wiki/Osmosis
74
83
75
84
To know the options, run:
76
- ./osm4routing --help
85
+ python parse.py --help
77
86
87
+ == PERFORMANCE ==
88
+ OSM data can get very big and can be very consuming, don't try to parse the whole world ;)
89
+ On my laptop from 2006 (core2duo 1.66Ghz, 2Gb Ram, slow hard drive),
90
+ it takes 20 minutes to parse 8Gb uncompressed (0.5Gb as bzip2) and represents France in June 2010
78
91
79
- == Postgres output ==
80
- The database must be a postgis database.
92
+ == Postgis output ==
93
+ Only if you want to use the spatial abilities of postgis, please read those extra informations
94
+ in order to a have spatial database
81
95
The usual way to get is to execute the following commands (the location of
82
96
lwpostgis.sql and spatial_ref_sys.sql depend on your installation).
83
97
0 commit comments