Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
Add OpenStreetMap data loading instructions
Browse files Browse the repository at this point in the history
These are based on the ones for OpenStreetMap Carto
  • Loading branch information
pnorman committed May 28, 2017
1 parent 625fe78 commit a9c4c74
Show file tree
Hide file tree
Showing 3 changed files with 487 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vector/README.md
@@ -1 +1,11 @@
This directory contains the definitions needed to generate the vector tiles

## Installation

You need OpenStreetMap data loaded into a PostGIS database with [osm2pgsql](https://github.com/openstreetmap/osm2pgsql) using the [OpenStreetMap Carto schema](https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md#openstreetmap-data)

Start by setting up your database to have PostGIS and hstore with ``psql -d gis -c 'CREATE EXTENSION postgis; CREATE EXTENSION hstore;'``, then grab some OSM data. It's probably easiest to grab an PBF of OSM data from [Mapzen](https://mapzen.com/metro-extracts/) or [geofabrik](http://download.geofabrik.de/). Once you've done that, import with osm2pgsql:

```
osm2pgsql -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis ~/path/to/data.osm.pbf
```

0 comments on commit a9c4c74

Please sign in to comment.