Skip to content

Commit 6ba35df

Browse files
committed
Going through python for the interface
1 parent ec2a37d commit 6ba35df

20 files changed

+2478
-956
lines changed

README

+24-10
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@ adapted for routing applications.
44
== INPUT FORMAT ==
55
The input is an OpenStreetMap XML file. The file can be read:
66
* from a plain .osm file
7-
* from a bz2 file
8-
* from stdin
7+
* from a bzip2 file
8+
* from a gzip file
99

1010
== OUTPUT FORMAT ==
1111
The output can be:
1212
* a csv file
13-
* postgis database (geographical extension to postgres).
13+
* database (postgres, mysql, sqlite, postgis)
1414

1515
In both output you'll get two files/tables:
1616
* nodes that contain
1717
* id (64 bit integer)
1818
* longitude (decimal real)
1919
* latitude (decimal real)
20+
* geometry (only in postgis)
2021

2122
* edges that contain
2223
* id (64 bit integer)
@@ -58,26 +59,39 @@ The integers mean:
5859

5960
== INSTALL ==
6061
You need:
61-
* the GCC C++ complier (g++)
6262
* Boost
6363
* expat (XML parser)
64-
* libbz2 (Bzip2)
65-
* libpq (postgres)
64+
* python
65+
* swig
6666

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
6876

6977

7078
== USAGE ==
7179
Get the .osm XML file of the region that interests you.
7280
For limited regions, use the export tools from the web interface.
7381
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
7483

7584
To know the options, run:
76-
./osm4routing --help
85+
python parse.py --help
7786

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
7891

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
8195
The usual way to get is to execute the following commands (the location of
8296
lwpostgis.sql and spatial_ref_sys.sql depend on your installation).
8397

bz2reader.cc

-53
This file was deleted.

bz2reader.h

-33
This file was deleted.

csvwriter.cc

-72
This file was deleted.

csvwriter.h

-43
This file was deleted.

0 commit comments

Comments
 (0)