diff --git a/README.md b/README.md index 714d308..95e37b9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ implementation. [Carto]: http://github.com/mapbox/carto/ [TileMill]: http://tilemill.com/ -[issue tracker]: http://github.com/developmentseed/osm-bright/issues/ +[issue tracker]: http://github.com/mapbox/osm-bright/issues/ Setup Instructions ------------------ diff --git a/configure.py.sample b/configure.py.sample index b3ea745..2cca3f9 100755 --- a/configure.py.sample +++ b/configure.py.sample @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + #!/usr/bin/env python from os import path, getcwd @@ -32,15 +35,10 @@ 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). 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"] = 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") +# These OSM land shapefiles are updated daily and can be downloaded from: +# - http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip +# - http://data.openstreetmapdata.com/land-polygons-split-3857.zip + +config["land-high"] = path.join(getcwd(),"land-polygons-split-3857.zip") +config["land-low"] = path.join(getcwd(),"simplified-land-polygons-complete-3857.zip") + diff --git a/make.py b/make.py index 97f0cf3..516283b 100755 --- a/make.py +++ b/make.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + #!/usr/bin/env python import re @@ -41,12 +44,10 @@ def build(): #fill in the project template for layer in template["Layer"]: - if layer["id"] == "shoreline_300": - 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"] + if layer["id"] == "land-low": + layer["Datasource"]["file"] = config["land-low"] + elif layer["id"] == "land-high": + layer["Datasource"]["file"] = config["land-high"] else: # Assume all other layers are PostGIS layers for opt, val in config["postgis"].iteritems(): @@ -87,16 +88,15 @@ def pull(): defaultconfig["postgis"]["password"] = "" defaultconfig["postgis"]["extent"] = "-20037508.34 -20037508.34 20037508.34 20037508.34" 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" + defaultconfig["land-high"] = "http://data.openstreetmapdata.com/land-polygons-split-3857.zip" + defaultconfig["land-low"] = "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip" project["name"] = defaultconfig["name"] for layer in project["Layer"]: - if layer["id"] == "shoreline_300": - layer["Datasource"]["file"] = defaultconfig["shoreline_300"] - elif layer["id"] in ("processed_p", "processed_p_outline"): - layer["Datasource"]["file"] = defaultconfig["processed_p"] + if layer["id"] == "land-low": + layer["Datasource"]["file"] = defaultconfig["land-low"] + elif layer["id"] == "land-high": + layer["Datasource"]["file"] = defaultconfig["land-high"] else: # Assume all other layers are PostGIS layers for opt, val in defaultconfig["postgis"].iteritems(): diff --git a/osm-bright/osm-bright.osm2pgsql.mml b/osm-bright/osm-bright.osm2pgsql.mml index 48b7bb2..a2e57cf 100644 --- a/osm-bright/osm-bright.osm2pgsql.mml +++ b/osm-bright/osm-bright.osm2pgsql.mml @@ -25,7 +25,8 @@ "id": "land-high", "name": "land-high", "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", - "srs-name": "900913" + "srs-name": "900913", + "status": "on" }, { "Datasource": {