forked from waymarkedtrails/osgende
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
56 lines (37 loc) · 1.8 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
About osgende
-------------
osgende is a Python-framework for creating customized Postgresql databases from
OSM data. Its philosophy is not to import the data directly from the OSM-XML
but instead it expects OSM data to have been imported into a Postgresql
databases. This way it is also possible to support incremental
updates.
Requirements
------------
- psycopg >= 2.3.0 http://initd.org/psycopg/
Python bindings for PostgreSQL
Please note that Debian still ships version 2.2.1 which does not yet
have hstore support.
- Shapely http://trac.gispython.org/lab/wiki/Shapely
Python bindings for the geos library.
(available as Debian package: python-shapely)
- (optional) Osmosis http://wiki.openstreetmap.org/wiki/Osmosis
The full OSM database can also be imported with Osmosis. Be aware
that this option is considered experimental and is largely unmainted.
The prefered way to import and update the backing OSM DB is the
osgende-import tool.
Usage
-----
Creating Databases
------------------
Osgende needs the Postgis and hstore extensions enabled. It also requires a set
of functions of its own, which can be found in contrib/osgende_func.sql.
Setting up Osmosis
------------------
osgende expects data to have been imported into a PostGIS Snapshot Schema.
No further geometry computations are required, osgende will do them by itself.
For example, you may import the Swiss extract from Geofabrik[1] like this:
bzcat switzerland.osm.bz2 | osmosis --rx - --wp database=osm user=gis password=foo
In order to keep your database up-to-date you need to initialise the action script
first so that the *_changeset tables are filled appropriately. There is a script
in contrib/ which sets up Osmosis action function:
psql -U gis -d osm -f contrib/osmosis_update_proc.sql