diff --git a/README.md b/README.md index c2d1e05..0abaf9e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,18 @@ implementation. Setup Instructions ------------------ -### 1. Set up PostgreSQL & PostGIS ### +### 1. Download shapefiles + +OSM Bright depends on several large shapefiles. You should start downloading these +now so that they are ready later when you need them for rendering. + +Download them to the `osm-bright` directory. You can do this with `wget` like: + + wget http://tilemill-data.s3.amazonaws.com/osm/coastline-good.zip + wget http://tilemill-data.s3.amazonaws.com/osm/shoreline_300.zip + wget http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.3.0/physical/10m-land.zip + +### 2. Set up PostgreSQL & PostGIS ### If you don't already, you need to have [PostgreSQL][] installed & running with a [PostGIS][] database setup within it. See the [PostGIS documentation][1] for diff --git a/configure.py.sample b/configure.py.sample index 31fabf9..b3ea745 100755 --- a/configure.py.sample +++ b/configure.py.sample @@ -1,6 +1,6 @@ #!/usr/bin/env python -from os import path +from os import path, getcwd from collections import defaultdict config = defaultdict(defaultdict) @@ -28,14 +28,19 @@ config["postgis"]["password"] = "" # in the same units as the database (probably spherical mercator meters). The # whole world is "-20037508.34 -20037508.34 20037508.34 20037508.34". # Leave blank to let Mapnik estimate. -config["postgis"]["extent"] = "-20037508.34 -20037508.34 20037508.34 20037508.34" +config["postgis"]["extent"] = "-20037508.34,-20037508.34,20037508.34,20037508.34" # Land shapefiles required for the style. If you have already downloaded # these or wish to use different versions, specify their paths here. # OSM land shapefiles from MapBox are indexed for Mapnik and have blatant -# errors corrected (eg triangles along the 180 E/W line), but are updated -# infrequently. The latest versions can be downloaded from osm.org: +# errors corrected (eg triangles along the 180 E/W line). They can be download +# from: +# - http://tilemill-data.s3.amazonaws.com/osm/coastline-good.zip +# - http://tilemill-data.s3.amazonaws.com/osm/shoreline_300.zip +# But, they are updated infrequently. The latest versions can be downloaded from osm.org: # - http://tile.openstreetmap.org/processed_p.tar.bz2 # - http://tile.openstreetmap.org/shoreline_300.tar.bz2 -config["processed_p"] = "http://tilemill-data.s3.amazonaws.com/osm/coastline-good.zip" -config["shoreline_300"] = "http://tilemill-data.s3.amazonaws.com/osm/shoreline_300.zip" +config["processed_p"] = path.join(getcwd(),"coastline-good.zip") +config["shoreline_300"] = path.join(getcwd(),"shoreline_300.zip") +# http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.3.0/physical/10m-land.zip +config["land"] = path.join(getcwd(),"10m-land.zip") diff --git a/make.py b/make.py index 68a2a81..97f0cf3 100755 --- a/make.py +++ b/make.py @@ -45,6 +45,8 @@ def build(): layer["Datasource"]["file"] = config["shoreline_300"] elif layer["id"] in ("processed_p", "processed_p_outline"): layer["Datasource"]["file"] = config["processed_p"] + elif layer["id"] in ("land"): + layer["Datasource"]["file"] = config["land"] else: # Assume all other layers are PostGIS layers for opt, val in config["postgis"].iteritems(): @@ -87,6 +89,7 @@ def pull(): defaultconfig["name"] = "OSM Bright" defaultconfig["processed_p"] = "http://tilemill-data.s3.amazonaws.com/osm/coastline-good.zip" defaultconfig["shoreline_300"] = "http://tilemill-data.s3.amazonaws.com/osm/shoreline_300.zip" + defaultconfig["land"] = "http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.3.0/physical/10m-land.zip" project["name"] = defaultconfig["name"] for layer in project["Layer"]: