diff --git a/docs/kartograph.py/osm.md b/docs/kartograph.py/osm.md index 8f42e16..3d30286 100644 --- a/docs/kartograph.py/osm.md +++ b/docs/kartograph.py/osm.md @@ -19,18 +19,17 @@ After installing [PostgreSQL](http://www.postgresql.org/) and the [PostGIS exten > createdb osm -Activate PostGIS on that database. You need to know where you installed PostGIS to find the postgis.sql and spatial_ref_sys.sql. For instance, if you installed PostGIS on Mac OS using homebrew, you find them under ``/usr/local/Cellar/postgis/1.5.3/share/postgis/``. +Activate PostGIS on that database. - - > psql -d osm -f path/to/your/postgis.sql - > psql -d osm -f path/to/your/spatial_ref_sys.sql + > psql -d osm -c "CREATE EXTENSION postgis;" + > psql -d osm -c "CREATE EXTENSION postgis_topology;" ## Import OpenStreetMap data Download a fresh OpenStreetMap dump. You can use either the XML version (.osm) or the binary version (.osm.pbf). - > wget http://download.geofabrik.de/osm/europe/germany/berlin.osm.pbf + > wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf Install [osm2pgsql](http://wiki.openstreetmap.org/wiki/Osm2pgsql) and import the OSM dump into the database. @@ -45,10 +44,12 @@ This can take quite a while (and consume lots of RAM), depending on the actual s And that's it. Now you can create a map using the [latest bleeding edge version of Kartograph](https://github.com/kartograph/kartograph.py/tree/kartograph-2) and the following minimal map configuration: { - "roads": { - "src": "postgis:dbname=osm", - "table": "planet_osm_roads" - } + "layers": { + "roads": { + "src": "postgis:dbname=osm", + "table": "planet_osm_roads" + } + } } Store this as ``map.json`` and run ``kartograph map.json -o map.svg`` to get a map like this: